home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / tex / textyl / textyl.shar7.Z / textyl.shar7
Encoding:
Text File  |  1987-08-10  |  71.6 KB  |  2,922 lines

  1. #!/bin/sh
  2. # to extract, remove the header and type "sh filename"
  3. if `test ! -d ./doc`
  4. then
  5.   mkdir ./doc
  6.   echo "mkdir ./doc"
  7. fi
  8. if `test ! -s ./doc/TYLMAN.10`
  9. then
  10. echo "writing ./doc/TYLMAN.10"
  11. cat > ./doc/TYLMAN.10 << 'E_O_F'
  12. \chapter{Font Example}\label{font-examples}
  13. % macros for font tables
  14. \def\oct#1{\hbox{\rm\'{}\kern-.2em\it#1\/\kern.05em}} % octal constant
  15. \def\hex#1{\hbox{\rm\H{}\tt#1}} % hexadecimal constant
  16. \def\oddline#1{\cr
  17.   \noalign{\nointerlineskip}
  18.   \multispan{19}\hrulefill&
  19.   \setbox0=\hbox{\lower 4pt\hbox{\hex{#1x}}}\smash{\box0}\cr%was 2.3pt
  20.   \noalign{\nointerlineskip}}
  21. \def\evenline{\cr\noalign{\hrule}}
  22. \def\chartstrut{\lower4.5pt\vbox to20pt{}}%was 14pt
  23. \def\beginchart#1{$$\postdisplaypenalty=-10000 \global\count222=0 #1
  24.   \halign to\hsize\bgroup
  25.     \chartstrut##\tabskip0pt plus10pt&
  26.     &\hfil##\hfil&\vrule##\cr
  27.     \lower6.5pt\null
  28.     &&&\oct0&&\oct1&&\oct2&&\oct3&&\oct4&&\oct5&&\oct6&&\oct7&\evenline}
  29. \def\endchart{\raise11.5pt\null&&&\hex 8&&\hex 9&&\hex A&&\hex B&
  30.   &\hex C&&\hex D&&\hex E&&\hex F&\cr\egroup$$}
  31. \def\:{\setbox0=\hbox{\char\count222}%
  32.   \ifdim\ht0>7.5pt\reposition
  33.   \else\ifdim\dp0>2.5pt\reposition\fi\fi
  34.   \box0\global\advance\count222 by1 }
  35. \def\reposition{\setbox0=\hbox{$\vcenter{\kern2pt\box0\kern2pt}$}}
  36. \def\normalchart{%
  37.   &\oct{00x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline0
  38.   &\oct{01x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
  39.   &\oct{02x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline1
  40.   &\oct{03x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
  41.   &\oct{04x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline2
  42.   &\oct{05x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
  43.   &\oct{06x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline3
  44.   &\oct{07x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
  45.   &\oct{10x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline4
  46.   &\oct{11x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
  47.   &\oct{12x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline5
  48.   &\oct{13x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
  49.   &\oct{14x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline6
  50.   &\oct{15x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
  51.   &\oct{16x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline7
  52.   &\oct{17x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline}
  53. \font\cv=cvec3
  54. \vfill\eject
  55. \centerline{Example of |cvec3|}\par
  56. \beginchart{\cv}
  57. \normalchart
  58. \endchart
  59. %\vfill\eject
  60. %\Makeodd
  61. E_O_F
  62. else
  63.   echo "will not over write ./doc/TYLMAN.10"
  64. fi
  65. chmod 644 ./doc/TYLMAN.10
  66. if [ `wc -c ./doc/TYLMAN.10 | awk '{printf $1}'` -ne 2082 ]
  67. then
  68. echo `wc -c ./doc/TYLMAN.10 | awk '{print "Got " $1 ", Expected " 2082}'`
  69. fi
  70. if `test ! -s ./doc/textyl.tex`
  71. then
  72. echo "writing ./doc/textyl.tex"
  73. cat > ./doc/textyl.tex << 'E_O_F'
  74. %   Inclusion file for TeXtyl
  75. %  This is textyl.tex
  76. %
  77. %    John Renner  (jsr@ohio-state.arpa)
  78. %
  79. % macros for figures for Tyling
  80. % specify : 
  81. % \begintyl{vert_dimen}[optional_horiz_dimen]
  82. %       (with NO intervening space between the } and the [ chars)
  83. % then the \special{tyl ...} strings
  84. %  then you must finish environment with  \endtyl 
  85. %
  86. %  \begintyl and \endtyl are the only 
  87. %    user-callable macros
  88. %   See the TeXtyl manual for a complete explanation.
  89. \def\begintyl#1{\begingroup\endlinechar=-1\catcode `\^^I=9
  90.     \dimen120=#1
  91.     \ifhmode\toks0={\futurelet\tyltempb\begHtyl}
  92.     \let\endtyl=\endHtyl
  93.     \else\toks0={\futurelet\tyltempb\begVtyl}
  94.     \let\endtyl=\endVtyl\fi
  95.     \the\toks0}
  96. %
  97. %-------the rest are internal------
  98. \def\begHtyl{\ifx [\tyltempb \let\tylh=\tylHspace
  99.     \else\let\tylh=\tylHnospace\fi\tylh}
  100. %
  101. \def\tylHspace[#1]{\setbox0=\hbox to #1\bgroup
  102.     \vbox to \dimen120\bgroup\vss}
  103. \def\tylHnospace{\setbox0=\hbox\bgroup
  104.     \vbox to \dimen120\bgroup\vss}
  105. %
  106. \def\begVtyl{\ifx [\tyltempb \let\tylv=\tylVspace
  107.     \else\let\tylv=\tylVnospace\fi\tylv}
  108. %
  109. \def\tylVspace[#1]{\setbox0=\vbox to \dimen120\bgroup\vss 
  110.     \hbox to #1\bgroup}
  111. \def\tylVnospace{\setbox0=\vbox to \dimen120\bgroup\vss
  112.     \hbox\bgroup}
  113. %
  114. \def\endHtyl{\egroup\hss\egroup\box0\endgroup}
  115. \def\endVtyl{\hss\egroup\egroup\box0\endgroup}
  116. E_O_F
  117. else
  118.   echo "will not over write ./doc/textyl.tex"
  119. fi
  120. chmod 644 ./doc/textyl.tex
  121. if [ `wc -c ./doc/textyl.tex | awk '{printf $1}'` -ne 1292 ]
  122. then
  123. echo `wc -c ./doc/textyl.tex | awk '{print "Got " $1 ", Expected " 1292}'`
  124. fi
  125. if `test ! -s ./doc/TYLMAN.13`
  126. then
  127. echo "writing ./doc/TYLMAN.13"
  128. cat > ./doc/TYLMAN.13 << 'E_O_F'
  129. \begin{theindex}
  130. \newcommand{\largeletter}[1]{{\pagebreak[2]\Large\hspace{-.5in}\parbox[t]{.5in}{\makebox[.35in][r]{\uppercase{#1}}}\nopagebreak[4]\vspace{-1.5ex}}}
  131. \item {\tt "}-marker 19, 48
  132. \item {\tt .dvi} file 3
  133. \item {\tt .tex} text file 1, 3, 34
  134. \item {\tt .tlog} file 4, 23
  135. \item {\tt .tyl} file 23
  136. \item {\tt ?!} flag 24
  137. \item {\tt ?} flag 23
  138. \item {\tt @}-marker 8, 19
  139. \indexspace
  140. \largeletter{a}
  141. \item {\tt arc} 36
  142. \item {\bf arc} 19
  143. \item arcs 7
  144.   \subitem  angles 8, 19
  145.   \subitem  attributes 36
  146.   \subitem  center 8
  147.   \subitem  centering 8, 19
  148.   \subitem  circles 8, 36
  149.   \subitem  closed splines 36
  150.   \subitem  control points 31, 36
  151.   \subitem  ellipses 36
  152.   \subitem  example 8
  153.   \subitem  open 36
  154.   \subitem  open spline 36
  155.   \subitem  phantoming 37
  156.   \subitem  radius 8
  157.   \subitem  representation 31, 36
  158. \indexspace
  159. \largeletter{b}
  160. \item {\tt B}-marker 6, 14, 20
  161. \item B-spline basis 6, 20
  162. \item B-splines 
  163.   \subitem  interpolating-type 6
  164.   \subitem  recomputing points 30
  165. \item {\bf beam} 22
  166. \item {\tt beam} 37
  167. \item beam-types 22
  168. \item beam font 29
  169.   \subitem  constraints 30
  170.   \subitem  design 29
  171.   \subitem  difference from vector font 29
  172.   \subitem  lengths 30
  173.   \subitem  range of angles 30
  174.   \subitem  relation to staff size 29
  175.   \subitem  sizes 29
  176.   \subitem  types 29
  177. \item beams 16
  178.   \subitem  attributes 37
  179.   \subitem  default size 22
  180.   \subitem  difference from lines 37
  181.   \subitem  sizes 22
  182.   \subitem  staff size 22
  183.   \subitem  typesetting 45
  184. \item {\bf beginfigure} 11, 22
  185. \item {\tt begintyl} 1, 3, 4, 12, 57
  186. \item bitmaps {\it\romannumeral 6}
  187. \item blank space 17
  188. \item bounding box 34, 38, 41
  189. \item boxes 1, 3, 9
  190. \indexspace
  191. \largeletter{c}
  192. \item {\tt C}-marker 20
  193. \item capabilities {\it\romannumeral 5}, {\it\romannumeral 6}, 17
  194. \item Cardinal basis 6, 20
  195. \item cartesian-space 2
  196. \item Catmull-Rom basis 20
  197. \item Catmull-Rom splines 5, 30
  198. \item circles 7, 8, 36
  199.   \subitem  control points 31, 36
  200.   \subitem  relation to arcs 36
  201.   \subitem  representation 31
  202. \item circular pen 20
  203. \item clamping 35, 43, 49
  204. \item closed splines 14, 20
  205. \item closure 20
  206. \item combining primitives 9, 10
  207. \item coordinates 2
  208.   \subitem  origin 2
  209. \item coordinate space system 19
  210. \item current position 1, 2, 3, 17
  211. \item curves 5
  212. \indexspace
  213. \largeletter{d}
  214. \item {\tt D}-marker 6, 20
  215. \item defaulting values 5
  216. \item defining fonts 46
  217. \item delimiters 6, 48
  218. \item design decisions 21, 27, 30
  219. \item design goals {\it\romannumeral 5}
  220. \item DVI {\it\romannumeral 5}
  221. \item DVI-filters 4
  222. \item DVI-space 35, 38, 43
  223. \item DVI file 27
  224.   \subitem  previewing 33
  225. \item DVI format 46
  226. \item DVI position coordinates 27
  227. \item DVISUN 33
  228. \item DVItype 27, 47
  229. \indexspace
  230. \largeletter{e}
  231. \item ellipses 19, 31, 36
  232.   \subitem  relation to circles 36
  233. \item {\tt endfigure} 42
  234. \item {\bf endfigure} 11, 22
  235. \item {\tt endtyl} 1, 12, 57
  236. \item errors 
  237.   \subitem  internal 24
  238. \item extensions 49
  239. \indexspace
  240. \largeletter{f}
  241. \item {\tt F}-marker 22
  242. \item figure definitions 22
  243. \item figures 10
  244.   \subitem  context 41
  245.   \subitem  defining 11
  246.   \subitem  example 12
  247.   \subitem  examples 11
  248.   \subitem  fitting to size 22
  249.   \subitem  nested symbols 11
  250.   \subitem  preparation 2
  251.   \subitem  sub-figures 11
  252.   \subitem  tranforms 22
  253.   \subitem  transforms 10, 22
  254. \item fonts 
  255.   \subitem  computing dimensions of 42
  256.   \subitem  defining 46
  257.   \subitem  font flag 46
  258.   \subitem  for labels 38
  259.   \subitem  numbering 43
  260.   \subitem  to be defined 46
  261. \indexspace
  262. \largeletter{g}
  263. \item {\tt G}-marker 16, 22
  264. \item geometric transforms 21
  265. \item Giuse{,} Dario 28, 49
  266. \item grace-notes 16
  267. \item graphic editors 17, 22
  268. \item grid-origin 3
  269. \indexspace
  270. \largeletter{h}
  271. \item {\tt H}-marker 20
  272. \item handlers 38
  273.   \subitem  design idea 39
  274.   \subitem  figurehandle 39
  275.   \subitem  functionality 38
  276.   \subitem  linehandle 38
  277.   \subitem  ttsplinehandle 38
  278. \item handling specials 27
  279. \item horizontal pen 20
  280. \indexspace
  281. \largeletter{i}
  282. \item {\tt I}-marker 6, 20
  283. \item Ideal {\it\romannumeral 5}
  284. \item {\tt input} 1
  285. \item interpolating B-spline 6
  286.   \subitem  basis 20
  287. \item item 39, 40
  288.   \subitem  inserting 41
  289.   \subitem  packing 40
  290.   \subitem  traversing 41
  291. \indexspace
  292. \largeletter{j}
  293. \item jaggies 36
  294. \indexspace
  295. \largeletter{k}
  296. \item {\tt K}-marker 5, 20
  297. \item keywords 6, 48
  298. \item Knuth{,} Donald 1
  299. \indexspace
  300. \largeletter{l}
  301. \item {\tt L}-marker 20
  302. \item {\tt label} 37
  303. \item {\bf label} 19
  304. \item labels 
  305.   \subitem  face 19
  306.   \subitem  font face-styles 38
  307.   \subitem  font style 19
  308.   \subitem  strings 19
  309. \item {\LaTeX} 1, 3, 17, 51
  310.   \subitem  {\tt figure } environment 17
  311. \item {\tt layline} 43
  312. \item leaving no space 3
  313. \item leaving white space 3
  314. \item lies 37, 44
  315. \item {\tt line} 35
  316. \item {\bf line} 18
  317. \item line example 1
  318. \item line segments 18, 35
  319. \item line style 20, 34
  320.   \subitem  dashed 20
  321.   \subitem  dot-dashed 20
  322.   \subitem  dotted 20
  323.   \subitem  solid 20
  324. \item line styles 
  325.   \subitem  examples 20
  326. \item line thickness 2, 18, 20, 31, 43
  327.   \subitem  example 20
  328. \item local maintainer 4, 25
  329. \item Lucas{,} Bruce 42
  330. \indexspace
  331. \largeletter{m}
  332. \item {\tt M}-marker 5, 6, 10
  333. \item {\tt M}-measure 19
  334. \item macro-expansion 33, 46
  335. \item macros 1, 9, 57
  336.   \subitem  {\it see} {\tt begintyl} 1
  337. \item markers 6
  338. \item measurement 19
  339.   \subitem  default 19
  340.   \subitem default 22
  341.   \subitem  units 2
  342. \item Metafont 28, 42
  343.   \subitem  limitations 28
  344. \item millimeters 19
  345.   \subitem  measurement 5
  346. \item music {\it\romannumeral 5}, 21
  347. \item music font 29
  348. \item MusiCopy {\it\romannumeral 5}, 15, 42
  349. \indexspace
  350. \largeletter{n}
  351. \item Nelson{,} Bruce 28
  352. \item nested symbols 11
  353. \indexspace
  354. \largeletter{o}
  355. \item {\tt O}-marker 14, 20
  356. \item open spline 14, 20
  357. \item optional values 5
  358. \item origin 2
  359. \item origin of quadrant 17
  360. \item OSU 14
  361. \item output device 4, 49
  362.   \subitem  font memory 36
  363. \item oval 
  364.   \subitem  {\it see} ellipse 19
  365. \indexspace
  366. \largeletter{p}
  367. \item {\tt P}-measure 19
  368. \item parameters to {\TT} 17
  369. \item Pascal 33
  370. \item pens 20
  371. \item phantom control points 37
  372. \item phantoming 37
  373. \item pixel thickness 20
  374. \item {\tt pop} 39
  375. \item postamble 47
  376. \item PostScript {\it\romannumeral 6}
  377. \item preamble 1
  378. \item preparing a figure 2
  379. \item primitive 2
  380. \item primitives 17, 34
  381.   \subitem  attributes 34
  382.   \subitem  built-up 17
  383.   \subitem  combining 9, 10
  384.   \subitem  definition of 40
  385.   \subitem  invoking 9
  386.   \subitem  modifying attributes 34
  387.   \subitem  names 48
  388.   \subitem  parameters 9, 18
  389.   \subitem  reduction of 34
  390.   \subitem  scaling; rot\-ating; trans\-lating 9
  391. \item printer's points 19
  392.   \subitem  measurement 2
  393. \item programmer's hook 43
  394. \item programs making figures 22
  395. \item {\tt push} 39
  396. \indexspace
  397. \largeletter{r}
  398. \item {\tt R}-marker 16, 22
  399. \item reference point 17
  400. \item rotation 9, 10
  401.   \subitem  using degrees measurement 10
  402. \item running {\TT} 3
  403. \indexspace
  404. \largeletter{s}
  405. \item {\tt S}-measure 19
  406. \item Saxe{,} James 28
  407. \item scaled points 19
  408. \item scaling 9
  409. \item slurs 15, 21, 30, 31
  410.   \subitem  {\it see also} ties 16
  411. \item space 1, 3, 51
  412. \item space macros 1
  413. \item special 38
  414. \item {\tt special} 2
  415. \item specials 2, 17, 27, 46, 57
  416.   \subitem  case insensitivity 6
  417.   \subitem  handling 33
  418.   \subitem  handling by {\TT} 27
  419.   \subitem  punctuation 6
  420.   \subitem  typing in 6
  421. \item {\tt spline} 35
  422. \item {\bf spline} 18
  423. \item spline 
  424.   \subitem  B-spline 6
  425.   \subitem  Cardinal 6
  426.   \subitem  Catmull-Rom 5
  427.   \subitem  control-points 5
  428.   \subitem  coordinates 5
  429.   \subitem  default 5
  430.   \subitem  example 5
  431.   \subitem  Interpolating B-spline 6
  432.   \subitem  ttspline 6
  433. \item spline curves 5
  434. \item splines 
  435.   \subitem  attributes 35
  436.   \subitem  B-spline 35
  437.     \subsubitem  example 15
  438.   \subitem  basis 20, 35
  439.   \subitem  Cardinal 35
  440.     \subsubitem  example 14
  441.   \subitem  Catmull-Rom 35
  442.     \subsubitem  example 14
  443.   \subitem  clamping 35
  444.   \subitem  closed 14
  445.   \subitem  closure 20
  446.   \subitem  default basis 20
  447.   \subitem  default closure 20
  448.   \subitem  default type 30
  449.   \subitem  families 30
  450.   \subitem  Interpolating B-spline 
  451.     \subsubitem  example 15
  452.   \subitem  interpolation 30
  453.   \subitem  inversion 30
  454.   \subitem  open 14
  455.   \subitem  types 20
  456.   \subitem  typesetting 47
  457.   \subitem  use in simulating 37
  458. \item staff-size 16
  459. \item staff lines 37
  460. \item staff sizes 29, 37
  461. \item Standard{,} Paul {\it\romannumeral 1}
  462. \item sub-figures 11
  463. \item subdivision of splines 47
  464. \item surprise errors 24
  465. \item symbol 
  466.   \subitem  {\it see} figure 22
  467. \indexspace
  468. \largeletter{t}
  469. \item {\tt T}-marker 10, 12
  470. \item {\TeX} {\it\romannumeral 5}, 1, 3, 17, 34, 51
  471. \item \TeX book 9
  472. \item {\TeX} commands 17, 51
  473. \item {\TT} {\it\romannumeral 5}
  474.   \subitem  {\tt .tlog} log-file 23
  475.   \subitem  error handling 23
  476.   \subitem  error messages 24
  477.   \subitem  error recovering 23
  478.   \subitem  how to read manual {\it\romannumeral 6}
  479.   \subitem  name {\it\romannumeral 5}
  480.   \subitem  parameters 17
  481.   \subitem  serious problems 26
  482.   \subitem  signatures 43, 48
  483.   \subitem  simple problem 25
  484. \item {\tt textyl.tex} file 1
  485. \item TFM information 27
  486. \item Thick-n-thin spline 6
  487. \item ties 15, 21, 30
  488.   \subitem  and ttsplines 16
  489.   \subitem  example 16
  490.   \subitem  {\it see also} slurs 16
  491. \item {\bf tieslur} 21
  492. \item {\tt tieslur} 35
  493. \item tieslur 
  494.   \subitem  attributes 35
  495.   \subitem  clamping 35
  496.   \subitem  example 16
  497.   \subitem  implementation 31
  498.   \subitem  pen type 21
  499.   \subitem  relation to ttsplines 35
  500.   \subitem  representation 34
  501.   \subitem  thicknesses 16, 21
  502.   \subitem  vector type 21
  503. \item tranforms 
  504.   \subitem  figure-level 22
  505. \item {\bf transform} 21
  506. \item transformations 
  507.   \subitem  {\it see } transforms 21
  508. \item transforms 9
  509.   \subitem  additiveness 22, 42
  510.   \subitem  concatenation 11
  511.   \subitem  example 10
  512.   \subitem  figure-level 41
  513.   \subitem  mirroring 10
  514.   \subitem  no-op 10
  515.   \subitem  parameters 10, 21
  516.     \subsubitem  format 21
  517.     \subsubitem  requirement 21
  518.   \subitem  rotating 9
  519.   \subitem  scaling 9
  520.   \subitem  sub-figures 11
  521.   \subitem  top-level 42
  522.   \subitem  translation 9
  523. \item transform to DVI space 39
  524. \item translating 9
  525. \item {\tt ttspline} 35
  526. \item ttspline 6, 31
  527.   \subitem  clamping 35
  528.   \subitem  defaults 6
  529.   \subitem  example 6
  530.   \subitem  line thicknesses 31
  531.   \subitem  thicknesses 6, 18
  532. \item {\bf ttspline} 18
  533. \item tyling {\it\romannumeral 5}, 33, 37, 46
  534. \item {\tt tyl} name-string 2
  535. \item typing in special strings 6
  536. \indexspace
  537. \largeletter{u}
  538. \item {\tt U}-marker 14, 20
  539. \item units of measure 19
  540. \item Unix 33
  541. \item user's view 17
  542. \item user intuition 21
  543. \indexspace
  544. \largeletter{v}
  545. \item {\tt V}-marker 20
  546. \item vector-types 20
  547.   \subitem  default 20
  548. \item vector font 20, 28
  549.   \subitem  computing dimensions 28
  550.   \subitem  cvec 29
  551.   \subitem  dimensions 28
  552.   \subitem  mapping function 44
  553.   \subitem  path invariance 45
  554.   \subitem  pen-types 29
  555.   \subitem  pens 
  556.     \subsubitem  example 29
  557.   \subitem  pixelsize 29
  558.   \subitem  range of angles 28
  559.   \subitem  sizes 29
  560.   \subitem  types 29
  561. \item vectors 
  562.   \subitem  typesetting with 28
  563. \item vertical pen 20
  564. \indexspace
  565. \largeletter{w}
  566. \item {\tt W}-marker 22
  567. \indexspace
  568. \largeletter{x}
  569. \item {\tt X}-marker 18
  570. \indexspace
  571. \largeletter{z}
  572. \item Zapf{,} Hermann {\it\romannumeral 1}
  573. \end{theindex}
  574.  
  575. \end{document}
  576. E_O_F
  577. else
  578.   echo "will not over write ./doc/TYLMAN.13"
  579. fi
  580. chmod 644 ./doc/TYLMAN.13
  581. if [ `wc -c ./doc/TYLMAN.13 | awk '{printf $1}'` -ne 11122 ]
  582. then
  583. echo `wc -c ./doc/TYLMAN.13 | awk '{print "Got " $1 ", Expected " 11122}'`
  584. fi
  585. if `test ! -s ./doc/TYLMAN.12`
  586. then
  587. echo "writing ./doc/TYLMAN.12"
  588. cat > ./doc/TYLMAN.12 << 'E_O_F'
  589. \begin{thebibliography}{99}
  590. \typeout{bib}
  591. \bibitem{adobe}Adobe Systems Inc., {\it PostScript Language Reference Manual.}
  592. Addison-Wesley, Reading, MA, 1985.
  593.  
  594. \bibitem{ahu}Alfred V. Aho, John E. Hopcroft, and Jeffrey D. Ullman, {\it
  595. The Design and Analysis of Computer Algorithms.} Addison-Wesley, Reading,
  596. Mass. 1974.
  597.  
  598. \bibitem{barsky}Brian A. Barsky, and Donald P. Greenberg, ``Determining a
  599. Set of B-spline Control Vertices to Generate an Interpolating Surface.''
  600. {\it Computer Graphics and Image Processing.} {\bf 14} 3, (Nov. 1980), pp.203--226.
  601.  
  602. \bibitem{cagd}Edwin E. Catmull, and Raphael J. Rom, ``A Class of Local
  603. Interpolating Splines.'' {\it Computer Aided Geometric Design.}
  604. Robert E. Barnhill and Richard F. Riesenfeld, eds.
  605.  Academic Press, New York, NY, 1974, pp. 317--326.
  606.  
  607. \bibitem{dvitype}David R. Fuchs, Howard Trickey, {\it The DVI$\,$type processor.} Program
  608. documentation, 1983--4.
  609.  
  610. \bibitem{dario}Dario Giuse, {\it DP---Format of the drawing files.}
  611. Technical Report. Car\-negie -Mellon University Robotics Institute, 1983.
  612.  
  613. \bibitem{gourlay}John S. Gourlay, ``A Language for Music Printing.'' 
  614. {\it Communications of the ACM\/} {\bf 29} 5, (May 1986), pp. 388--401.
  615.  
  616. \bibitem{dvisun}Norm Hutchinson, et al. {\smallrm DVISUN} Program. 1983.
  617.  
  618. \bibitem{knuth-tex82}Donald E. Knuth, {\it The \TeX book.} Addison-Wesley,
  619. Reading, Mass. 1984.
  620.  
  621. \bibitem{knuth-mf}Donald E. Knuth, {\it \TeX\ and METAFONT: New Directions in
  622. Typesetting.} Digital Press, Bedford, MA, 1979.
  623.  
  624. \bibitem{nelson-saxe}Bruce Nelson, and James Saxe, ``Drawing Splines with a 
  625. Vector Font.''
  626. Unpublished technical report. Carnegie-Mellon University, 1980.
  627.  
  628. \bibitem{ross}Ted Ross, {\it The Art of Music Engraving and Processing.}
  629. Hansen Books, 1970.
  630.  
  631. \bibitem{updike}Daniel Berkeley Updike, {\it Printing Types: Their History,
  632. Forms, and Use.} Harvard University Press, Cambridge, MA, 1937.
  633.  
  634. \bibitem{wu-abel}Sheng-Chuan Wu, John F. Abel, and Donald Greenberg,
  635.   ``An Interactive Computer 
  636. Graphics Approach to Surface Representation.'' 
  637.  {\it Communications of the ACM\/} {\bf 20} 10, (Oct. 1977), pp. 703--712.
  638.  
  639. \bibitem{vanwyk}Christopher J. Van Wyk, {\it A Language for Typesetting
  640. Graphics.} Ph.D. dissertation. Stanford University, 1980.
  641.  
  642. \bibitem{zapf}Hermann Zapf, {\it The Printing Salesman's Herald.} Book 39.
  643. Champion Papers, New York, NY, 1978.
  644. \end{thebibliography}
  645. \Makeodd
  646. E_O_F
  647. else
  648.   echo "will not over write ./doc/TYLMAN.12"
  649. fi
  650. chmod 644 ./doc/TYLMAN.12
  651. if [ `wc -c ./doc/TYLMAN.12 | awk '{printf $1}'` -ne 2375 ]
  652. then
  653. echo `wc -c ./doc/TYLMAN.12 | awk '{print "Got " $1 ", Expected " 2375}'`
  654. fi
  655. if `test ! -s ./doc/TYLMAN.11`
  656. then
  657. echo "writing ./doc/TYLMAN.11"
  658. cat > ./doc/TYLMAN.11 << 'E_O_F'
  659. \chapter{Macros and Extended Examples}\label{secapp}
  660. All of the thumbnail figures in this manual were created using the 
  661. |\special{tyl...| strings\index{specials} as described, and were placed within an
  662. environment delimited by |\begintyl| and |\endtyl|.\index{{\tt
  663. begintyl}}\index{{\tt endtyl}} This environment allows
  664. the user to specify a vertical and optional horizontal offset from the
  665. ``current-position'' on the page. This determines where the origin of the
  666. user's coordinate system is to be placed. Also, this environment sets
  667. parameters so that the user can use tabbing and spacing to align the
  668. \hbox{|\special|} strings as he desires (e.g., to better show the nesting of
  669. figures and graphic-primitives). The macros\index{macros} used are defined 
  670. below:
  671. \vspace*{-20pt}
  672.  
  673. \bgroup\footnotesize
  674. \begin{verbatim}
  675.   %  This is textyl.tex
  676.   %
  677.   % macros for figures for Tyling
  678.   % specify : 
  679.   % \begintyl{vert_dimen}[optional_horiz_dimen]
  680.   %       (with NO intervening space between the } and the [ chars)
  681.   % then the \special{tyl ...} strings
  682.   %  then you must finish environment with  \endtyl 
  683.   %
  684. \def\begintyl#1{\begingroup\endlinechar=-1\catcode `\^^I=9
  685.     \dimen120=#1
  686.     \ifhmode\toks0={\futurelet\tyltempb\begHtyl}
  687.     \let\endtyl=\endHtyl
  688.     \else\toks0={\futurelet\tyltempb\begVtyl}
  689.     \let\endtyl=\endVtyl\fi
  690.     \the\toks0}
  691. \def\begHtyl{\ifx [\tyltempb \let\tylh=\tylHspace
  692.     \else\let\tylh=\tylHnospace\fi\tylh}
  693. %
  694. \def\tylHspace[#1]{\setbox0=\hbox to #1\bgroup
  695.     \vbox to \dimen120\bgroup\vss}
  696. \def\tylHnospace{\setbox0=\hbox\bgroup
  697.     \vbox to \dimen120\bgroup\vss}
  698. %
  699. \def\begVtyl{\ifx [\tyltempb \let\tylv=\tylVspace
  700.     \else\let\tylv=\tylVnospace\fi\tylv}
  701. %
  702. \def\tylVspace[#1]{\setbox0=\vbox to \dimen120\bgroup\vss 
  703.     \hbox to #1\bgroup}
  704. \def\tylVnospace{\setbox0=\vbox to \dimen120\bgroup\vss
  705.     \hbox\bgroup}
  706. %
  707. \def\endHtyl{\egroup\hss\egroup\box0\endgroup}
  708. \def\endVtyl{\hss\egroup\egroup\box0\endgroup}
  709. \end{verbatim}
  710.  
  711. \egroup
  712. \par
  713. Let's look at a non-trivial example of frequently-used figures. The
  714. original figure is from \cite{ahu}, page 325. I'll give the diagram, and then
  715. the annotated |\special| commands.\par
  716. \begintyl{9cm}
  717. \special{tyl begin /AHU=fig=9.7/}
  718.   \special{tyl arc m 2 6 @ 10 46 10 10 /state=s1/}
  719.   \special{tyl label m 5 9 46 "s1"}
  720.   \special{tyl arc m 2 6 @ 62 20 10 10 /state=s2/}
  721.   \special{tyl lab m 5 61 20 "s2"}
  722.   \special{tyl arc m 2 6 @ 62 60 10 10 /state=s3/}
  723.   \special{tyl lab m 5 61 60 "s3"}
  724.   \special{tyl arc m 2 6 @ 104 34 10 10 /finalstate=s4/}
  725.   \special{tyl arc m 2 8 @ 104 34 10 10}
  726.   \special{tyl lab m 5 103 34 "s4"}
  727. %now draw the connectors  
  728.   \special{tyl line m 3 16 48 56 59 /s1-s2/}
  729.   \special{tyl lab m 1 30 53 "a"}
  730.      \special{tyl line m 3 56 59 53 60}% and the arrow
  731.      \special{tyl line m 3 56 59 54 57}
  732.      \special{tyl line m 3 53 60 54 57}
  733.  
  734.   \special{tyl line m 3 15 43 56 23 /s1-s3/}
  735.   \special{tyl lab m 1 32 30 "e"}
  736.      \special{tyl line m 3 56 23 55 25}
  737.      \special{tyl line m 3 56 23 53 23}
  738.      \special{tyl line m 3 55 25 53 23}
  739.  
  740.   \special{tyl spline m 3 4 12 52; 62 76; 90,63;  105,44 /s1-s4/}     
  741.   \special{tyl lab m 1 70 78 "b"}
  742.      \special{tyl line m 3 105,42 106 44}
  743.      \special{tyl line m 3 105 42 104 44}
  744.      \special{tyl line m 3 104 44 106 44}
  745.  
  746.   \special{tyl line m 3 62 26 62 54 /s3-s2/}
  747.   \special{tyl lab m 1 64 38 "b"}
  748.      \special{tyl line m 3 62 54 64 52}
  749.      \special{tyl line m 3 62 54 60 52}
  750.      \special{tyl line m 3 60 52 64 52}
  751.  
  752.   \special{tyl spline m 3 3 67 55; 80 42; 96 36 /s3-s4/}
  753.   \special{tyl lab m 1 76 40 "e"}
  754.      \special{tyl line m 3 96 36 95 38}
  755.      \special{tyl line m 3 96 36 95 35}
  756.      \special{tyl line m 3 95 35 95 38}
  757.  
  758.   \special{tyl spline m 3 3 69 61; 86 52; 98 40 /s4-s3/}
  759.   \special{tyl lab m 1 89 51 "a"}
  760.      \special{tyl line m 3 69 61 71 62}
  761.      \special{tyl line m 3 69 61 70 59}
  762.      \special{tyl line m 3 70 59 71 62}
  763.  
  764.   \special{tyl line m 3 69 22 96 32 /s2-s4/}
  765.   \special{tyl lab m 1 82 24 "e"}
  766.      \special{tyl line m 3 96 32, 94 33}
  767.      \special{tyl line m 3 96 32 95 30}
  768.      \special{tyl line m 3 94 33 95 30}
  769. \special{tyl endfigure}
  770. \endtyl\par
  771. And the text to produce this is:
  772.  
  773. \bgroup\footnotesize
  774. \begin{verbatim}
  775. \begintyl{9cm}
  776. \special{tyl begin /AHU=fig=9.7/}
  777.   \special{tyl arc m 2 6 @ 10 46 10 10 /state=s1/}
  778.   \special{tyl label m 5 9 46 "s1"}
  779.   \special{tyl arc m 2 6 @ 62 20 10 10 /state=s2/}
  780.   \special{tyl lab m 5 61 20 "s2"}
  781.   \special{tyl arc m 2 6 @ 62 60 10 10 /state=s3/}
  782.   \special{tyl lab m 5 61 60 "s3"}
  783.   \special{tyl arc m 2 6 @ 104 34 10 10 /finalstate=s4/}
  784.   \special{tyl arc m 2 8 @ 104 34 10 10}
  785.   \special{tyl lab m 5 103 34 "s4"}
  786. %now draw the connectors  
  787.   \special{tyl line m 3 16 48 56 59 /s1-s2/}
  788.   \special{tyl lab m 1 30 53 "a"}
  789.      \special{tyl line m 3 56 59 53 60}% and the arrow
  790.      \special{tyl line m 3 56 59 54 57}
  791.      \special{tyl line m 3 53 60 54 57}
  792.  
  793.   \special{tyl line m 3 15 43 56 23 /s1-s3/}
  794.   \special{tyl lab m 1 32 30 "e"}
  795.      \special{tyl line m 3 56 23 55 25}
  796.      \special{tyl line m 3 56 23 53 23}
  797.      \special{tyl line m 3 55 25 53 23}
  798.  
  799.   \special{tyl spline m 3 4 12 52; 62 76; 90,63;  105,44 /s1-s4/}     
  800.   \special{tyl lab m 1 70 78 "b"}
  801.      \special{tyl line m 3 105,42 106 44}
  802.      \special{tyl line m 3 105 42 104 44}
  803.      \special{tyl line m 3 104 44 106 44}
  804.  
  805.   \special{tyl line m 3 62 26 62 54 /s3-s2/}
  806.   \special{tyl lab m 1 64 38 "b"}
  807.      \special{tyl line m 3 62 54 64 52}
  808.      \special{tyl line m 3 62 54 60 52}
  809.      \special{tyl line m 3 60 52 64 52}
  810.  
  811.   \special{tyl spline m 3 3 67 55; 80 42; 96 36 /s3-s4/}
  812.   \special{tyl lab m 1 76 40 "e"}
  813.      \special{tyl line m 3 96 36 95 38}
  814.      \special{tyl line m 3 96 36 95 35}
  815.      \special{tyl line m 3 95 35 95 38}
  816.  
  817.   \special{tyl spline m 3 3 69 61; 86 52; 98 40 /s4-s3/}
  818.   \special{tyl lab m 1 89 51 "a"}
  819.      \special{tyl line m 3 69 61 71 62}
  820.      \special{tyl line m 3 69 61 70 59}
  821.      \special{tyl line m 3 70 59 71 62}
  822.  
  823.   \special{tyl line m 3 69 22 96 32 /s2-s4/}
  824.   \special{tyl lab m 1 82 24 "e"}
  825.      \special{tyl line m 3 96 32, 94 33}
  826.      \special{tyl line m 3 96 32 95 30}
  827.      \special{tyl line m 3 94 33 95 30}
  828. \special{tyl endfigure}
  829. \endtyl\par
  830. \end{verbatim}
  831.  
  832. \egroup
  833. \vfill
  834. \Makeodd
  835. E_O_F
  836. else
  837.   echo "will not over write ./doc/TYLMAN.11"
  838. fi
  839. chmod 644 ./doc/TYLMAN.11
  840. if [ `wc -c ./doc/TYLMAN.11 | awk '{printf $1}'` -ne 6185 ]
  841. then
  842. echo `wc -c ./doc/TYLMAN.11 | awk '{print "Got " $1 ", Expected " 6185}'`
  843. fi
  844. if `test ! -d ./src`
  845. then
  846.   mkdir ./src
  847.   echo "mkdir ./src"
  848. fi
  849. if `test ! -s ./src/texpaths.h`
  850. then
  851. echo "writing ./src/texpaths.h"
  852. cat > ./src/texpaths.h << 'E_O_F'
  853. /*
  854.  * This file defines the default paths that will be used for TeX software.
  855.  * (These paths are used if the user's environment doesn't specify paths.)
  856.  *
  857.  * Paths should be colon-separated and no longer than MAXINPATHCHARS-1
  858.  * (for defaultinputpath) or MAXOTHPATHCHARS (for other default paths).
  859.  */
  860.  
  861. #define MAXINPATHCHARS  700    /* maximum number of chars in an input path */
  862.  
  863. #define defaultinputpath  ".:/usr/lib/tex/macros"
  864.     /* this should always start with "." */
  865.  
  866. #define MAXOTHPATHCHARS 100     /* other paths should be much shorter */
  867.  
  868. #define defaultfontpath   "/usr/lib/tex/fonts"
  869.     /* it is probably best not to include "." here to prevent confusion
  870.        by spooled device drivers that think they know where the fonts
  871.        really are */
  872. #define defaultformatpath ".:/usr/lib/tex/ctex/macros"
  873. #define defaultpoolpath   ".:/usr/lib/tex"
  874.  
  875. /*---------------------------------------------------------
  876.  The following is for TeXtyl: the default directory where 
  877.     the .tfm files for the vector fonts can be found.
  878.     it needs the trailing slash , and must be *single*
  879.     quoted since Pascal delimits strings that way.
  880. */
  881.  
  882. #define TYLPATH    '/usr/lib/tex/fonts/'
  883.       /*    The length of the above TYLPATH string */
  884. #define TYLPATHLEN 19
  885. E_O_F
  886. else
  887.   echo "will not over write ./src/texpaths.h"
  888. fi
  889. chmod 644 ./src/texpaths.h
  890. if [ `wc -c ./src/texpaths.h | awk '{printf $1}'` -ne 1243 ]
  891. then
  892. echo `wc -c ./src/texpaths.h | awk '{print "Got " $1 ", Expected " 1243}'`
  893. fi
  894. if `test ! -s ./src/textyl.pas.ac`
  895. then
  896. echo "writing ./src/textyl.pas.ac"
  897. cat > ./src/textyl.pas.ac << 'E_O_F'
  898.     k := r + 5;
  899.         end;
  900.      3: begin        (* cmsl10 *)
  901.         labtfmnam.str[r + 3] := 's';
  902.         labtfmnam.str[r + 4] := 'l';
  903.         labtfmnam.str[r + 5] := '1';
  904.         labtfmnam.str[r + 6] := '0';
  905.     k := r + 6;
  906.         end;
  907.      4: begin        (* cmtt8 *)
  908.         labtfmnam.str[r + 3] := 't';
  909.         labtfmnam.str[r + 4] := 't';
  910.         labtfmnam.str[r + 5] := '8';
  911.     k := r + 5;
  912.         end;
  913.      5: begin        (* cmsl8 *)
  914.         labtfmnam.str[r + 3] := 's';
  915.         labtfmnam.str[r + 4] := 'l';
  916.         labtfmnam.str[r + 5] := '8';
  917.     k := r + 5;
  918.         end;
  919.    end; (* case *)
  920.   labtfmnam.str[k + 1] := '.';
  921.   labtfmnam.str[k + 2] := 't';
  922.   labtfmnam.str[k + 3] := 'f';
  923.   labtfmnam.str[k + 4] := 'm';
  924.  
  925.   labtfmnam.str[k+5] := chr(32);
  926.  
  927.   labtfmnam.len := k + 4;
  928.  
  929.   gettfm (labtfmnam, design, p1, space, p3, p4, p5, p6, p7, cksm);
  930.  
  931.   LFontsDefd := LFontsDefd + 1;
  932.  
  933.   if (LFontsDefd > SizLFontTable) then
  934.      begin
  935.        complain (ERRREALBAD);
  936.        writestrng(labtfmnam, true);
  937.        writeln(logfile,'---not loadable. Size of Label Font table too small');
  938.        writestrng(labtfmnam,false);
  939.        writeln(' cannot be loaded. Too many label fonts. Table too small.');
  940.        jumpout;
  941.      end;
  942.  
  943.   i := LFontsDefd;
  944.   new (LFontTable[i]);
  945.   with LFontTable[i]^ do
  946.     begin
  947.     strcopy (labtfmnam.str, FontName.str, labtfmnam.len);
  948.     FontName.len := labtfmnam.len;
  949.     Cksum := cksm;
  950.     DesSize := design;
  951.     internalnumber := style;
  952.     spacewidth := space;
  953.     DVIFontNum := GDVIFN +1;
  954.     Isdefined := false;
  955.     end;  (* with *)
  956.  
  957.   GDVIFN := GDVIFN + 1;
  958.   fonttobedefined ('L', i);
  959.   GetLabFont := i;
  960. 99:
  961. end;  
  962.     
  963.  
  964. {------------------------------------------------}
  965. function vectangle (dx, dy : integer) :real;
  966. begin
  967.   if (dx <> 0) then
  968.     vectangle := arctan (dy / (dx * 1.0)) * RADTODEG
  969.   else
  970.     begin
  971.     if (dy > 0) then 
  972.       vectangle := 90.0
  973.     else
  974.       vectangle := -90.0;
  975.     end;
  976. end;
  977.  
  978.  
  979. {-----------------------------------------------------------}
  980. procedure definevectors (* var Vec: pVectFontInfRec *);
  981. var  units : real;
  982. begin
  983.   units := Vec^.MaxVectLen / 16.0;
  984. with Vec^.FontInfo[  0] do begin
  985.     Cht := round( 15.9688 * units);
  986.     Cdp := 0;
  987.     Cwd := round(  0.9981 * units);
  988.     Angle :=   86.4237;
  989. end;
  990.  
  991. with Vec^.FontInfo[  1] do begin
  992.     Cht := round( 15.8764 * units);
  993.     Cdp := 0;
  994.     Cwd := round(  1.9846 * units);
  995.     Angle :=   82.8750;
  996. end;
  997.  
  998. with Vec^.FontInfo[  2] do begin
  999.     Cht := round( 15.7260 * units);
  1000.     Cdp := 0;
  1001.     Cwd := round(  2.9486 * units);
  1002.     Angle :=   79.3803;
  1003. end;
  1004.  
  1005. with Vec^.FontInfo[  3] do begin
  1006.     Cht := round( 15.5223 * units);
  1007.     Cdp := 0;
  1008.     Cwd := round(  3.8806 * units);
  1009.     Angle :=   75.9638;
  1010. end;
  1011.  
  1012. with Vec^.FontInfo[  4] do begin
  1013.     Cht := round( 15.2717 * units);
  1014.     Cdp := 0;
  1015.     Cwd := round(  4.7724 * units);
  1016.     Angle :=   72.6460;
  1017. end;
  1018.  
  1019. with Vec^.FontInfo[  5] do begin
  1020.     Cht := round( 14.9813 * units);
  1021.     Cdp := 0;
  1022.     Cwd := round(  5.6180 * units);
  1023.     Angle :=   69.4440;
  1024. end;
  1025.  
  1026. with Vec^.FontInfo[  6] do begin
  1027.     Cht := round( 14.6585 * units);
  1028.     Cdp := 0;
  1029.     Cwd := round(  6.4131 * units);
  1030.     Angle :=   66.3706;
  1031. end;
  1032.  
  1033. with Vec^.FontInfo[  7] do begin
  1034.     Cht := round( 14.3108 * units);
  1035.     Cdp := 0;
  1036.     Cwd := round(  7.1554 * units);
  1037.     Angle :=   63.4349;
  1038. end;
  1039.  
  1040. with Vec^.FontInfo[  8] do begin
  1041.     Cht := round( 13.9452 * units);
  1042.     Cdp := 0;
  1043.     Cwd := round(  7.8442 * units);
  1044.     Angle :=   60.6422;
  1045. end;
  1046.  
  1047. with Vec^.FontInfo[  9] do begin
  1048.     Cht := round( 13.5680 * units);
  1049.     Cdp := 0;
  1050.     Cwd := round(  8.4800 * units);
  1051.     Angle :=   57.9946;
  1052. end;
  1053.  
  1054. with Vec^.FontInfo[ 10] do begin
  1055.     Cht := round( 13.1847 * units);
  1056.     Cdp := 0;
  1057.     Cwd := round(  9.0645 * units);
  1058.     Angle :=   55.4915;
  1059. end;
  1060.  
  1061. with Vec^.FontInfo[ 11] do begin
  1062.     Cht := round( 12.8000 * units);
  1063.     Cdp := 0;
  1064.     Cwd := round(  9.6000 * units);
  1065.     Angle :=   53.1301;
  1066. end;
  1067.  
  1068. with Vec^.FontInfo[ 12] do begin
  1069.     Cht := round( 12.4178 * units);
  1070.     Cdp := 0;
  1071.     Cwd := round( 10.0895 * units);
  1072.     Angle :=   50.9061;
  1073. end;
  1074.  
  1075. with Vec^.FontInfo[ 13] do begin
  1076.     Cht := round( 12.0412 * units);
  1077.     Cdp := 0;
  1078.     Cwd := round( 10.5361 * units);
  1079.     Angle :=   48.8141;
  1080. end;
  1081.  
  1082. with Vec^.FontInfo[ 14] do begin
  1083.     Cht := round( 11.6726 * units);
  1084.     Cdp := 0;
  1085.     Cwd := round( 10.9431 * units);
  1086.     Angle :=   46.8476;
  1087. end;
  1088.  
  1089. with Vec^.FontInfo[ 15] do begin
  1090.     Cht := round( 11.3137 * units);
  1091.     Cdp := 0;
  1092.     Cwd := round( 11.3137 * units);
  1093.     Angle :=   45.0000;
  1094. end;
  1095.  
  1096. with Vec^.FontInfo[ 16] do begin
  1097.     Cht := round( 10.9431 * units);
  1098.     Cdp := 0;
  1099.     Cwd := round( 11.6726 * units);
  1100.     Angle :=   43.1524;
  1101. end;
  1102.  
  1103. with Vec^.FontInfo[ 17] do begin
  1104.     Cht := round( 10.5361 * units);
  1105.     Cdp := 0;
  1106.     Cwd := round( 12.0412 * units);
  1107.     Angle :=   41.1859;
  1108. end;
  1109.  
  1110. with Vec^.FontInfo[ 18] do begin
  1111.     Cht := round( 10.0895 * units);
  1112.     Cdp := 0;
  1113.     Cwd := round( 12.4178 * units);
  1114.     Angle :=   39.0939;
  1115. end;
  1116.  
  1117. with Vec^.FontInfo[ 19] do begin
  1118.     Cht := round(  9.6000 * units);
  1119.     Cdp := 0;
  1120.     Cwd := round( 12.8000 * units);
  1121.     Angle :=   36.8699;
  1122. end;
  1123.  
  1124. with Vec^.FontInfo[ 20] do begin
  1125.     Cht := round(  9.0645 * units);
  1126.     Cdp := 0;
  1127.     Cwd := round( 13.1847 * units);
  1128.     Angle :=   34.5085;
  1129. end;
  1130.  
  1131. with Vec^.FontInfo[ 21] do begin
  1132.     Cht := round(  8.4800 * units);
  1133.     Cdp := 0;
  1134.     Cwd := round( 13.5680 * units);
  1135.     Angle :=   32.0054;
  1136. end;
  1137.  
  1138. with Vec^.FontInfo[ 22] do begin
  1139.     Cht := round(  7.8442 * units);
  1140.     Cdp := 0;
  1141.     Cwd := round( 13.9452 * units);
  1142.     Angle :=   29.3578;
  1143. end;
  1144.  
  1145. with Vec^.FontInfo[ 23] do begin
  1146.     Cht := round(  7.1554 * units);
  1147.     Cdp := 0;
  1148.     Cwd := round( 14.3108 * units);
  1149.     Angle :=   26.5651;
  1150. end;
  1151.  
  1152. with Vec^.FontInfo[ 24] do begin
  1153.     Cht := round(  6.4131 * units);
  1154.     Cdp := 0;
  1155.     Cwd := round( 14.6585 * units);
  1156.     Angle :=   23.6294;
  1157. end;
  1158.  
  1159. with Vec^.FontInfo[ 25] do begin
  1160.     Cht := round(  5.6180 * units);
  1161.     Cdp := 0;
  1162.     Cwd := round( 14.9813 * units);
  1163.     Angle :=   20.5560;
  1164. end;
  1165.  
  1166. with Vec^.FontInfo[ 26] do begin
  1167.     Cht := round(  4.7724 * units);
  1168.     Cdp := 0;
  1169.     Cwd := round( 15.2717 * units);
  1170.     Angle :=   17.3540;
  1171. end;
  1172.  
  1173. with Vec^.FontInfo[ 27] do begin
  1174.     Cht := round(  3.8806 * units);
  1175.     Cdp := 0;
  1176.     Cwd := round( 15.5223 * units);
  1177.     Angle :=   14.0362;
  1178. end;
  1179.  
  1180. with Vec^.FontInfo[ 28] do begin
  1181.     Cht := round(  2.9486 * units);
  1182.     Cdp := 0;
  1183.     Cwd := round( 15.7260 * units);
  1184.     Angle :=   10.6197;
  1185. end;
  1186.  
  1187. with Vec^.FontInfo[ 29] do begin
  1188.     Cht := round(  1.9846 * units);
  1189.     Cdp := 0;
  1190.     Cwd := round( 15.8764 * units);
  1191.     Angle :=    7.1250;
  1192. end;
  1193.  
  1194. with Vec^.FontInfo[ 30] do begin
  1195.     Cht := round(  0.9981 * units);
  1196.     Cdp := 0;
  1197.     Cwd := round( 15.9688 * units);
  1198.     Angle :=    3.5763;
  1199. end;
  1200.  
  1201. with Vec^.FontInfo[ 31] do begin
  1202.     Cht := 0;
  1203.     Cdp := 0;
  1204.     Cwd := round( 16.0000 * units);
  1205.     Angle :=    0.0000;
  1206. end;
  1207.  
  1208. with Vec^.FontInfo[ 32] do begin
  1209.      Cdp := round(  0.9981 * units);
  1210.      Cht := 0;
  1211.     Cwd := round( 15.9688 * units);
  1212.     Angle :=   -3.5763;
  1213. end;
  1214.  
  1215. with Vec^.FontInfo[ 33] do begin
  1216.      Cdp := round(  1.9846 * units);
  1217.      Cht := 0;
  1218.     Cwd := round( 15.8764 * units);
  1219.     Angle :=   -7.1250;
  1220. end;
  1221.  
  1222. with Vec^.FontInfo[ 34] do begin
  1223.      Cdp := round(  2.9486 * units);
  1224.      Cht := 0;
  1225.     Cwd := round( 15.7260 * units);
  1226.     Angle :=  -10.6197;
  1227. end;
  1228.  
  1229. with Vec^.FontInfo[ 35] do begin
  1230.      Cdp := round(  3.8806 * units);
  1231.      Cht := 0;
  1232.     Cwd := round( 15.5223 * units);
  1233.     Angle :=  -14.0362;
  1234. end;
  1235.  
  1236. with Vec^.FontInfo[ 36] do begin
  1237.      Cdp := round(  4.7724 * units);
  1238.      Cht := 0;
  1239.     Cwd := round( 15.2717 * units);
  1240.     Angle :=  -17.3540;
  1241. end;
  1242.  
  1243. with Vec^.FontInfo[ 37] do begin
  1244.      Cdp := round(  5.6180 * units);
  1245.      Cht := 0;
  1246.     Cwd := round( 14.9813 * units);
  1247.     Angle :=  -20.5560;
  1248. end;
  1249.  
  1250. with Vec^.FontInfo[ 38] do begin
  1251.      Cdp := round(  6.4131 * units);
  1252.      Cht := 0;
  1253.     Cwd := round( 14.6585 * units);
  1254.     Angle :=  -23.6294;
  1255. end;
  1256.  
  1257. with Vec^.FontInfo[ 39] do begin
  1258.      Cdp := round(  7.1554 * units);
  1259.      Cht := 0;
  1260.     Cwd := round( 14.3108 * units);
  1261.     Angle :=  -26.5651;
  1262. end;
  1263.  
  1264. with Vec^.FontInfo[ 40] do begin
  1265.      Cdp := round(  7.8442 * units);
  1266.      Cht := 0;
  1267.     Cwd := round( 13.9452 * units);
  1268.     Angle :=  -29.3578;
  1269. end;
  1270.  
  1271. with Vec^.FontInfo[ 41] do begin
  1272.      Cdp := round(  8.4800 * units);
  1273.      Cht := 0;
  1274.     Cwd := round( 13.5680 * units);
  1275.     Angle :=  -32.0054;
  1276. end;
  1277.  
  1278. with Vec^.FontInfo[ 42] do begin
  1279.      Cdp := round(  9.0645 * units);
  1280.      Cht := 0;
  1281.     Cwd := round( 13.1847 * units);
  1282.     Angle :=  -34.5085;
  1283. end;
  1284.  
  1285. with Vec^.FontInfo[ 43] do begin
  1286.      Cdp := round(  9.6000 * units);
  1287.      Cht := 0;
  1288.     Cwd := round( 12.8000 * units);
  1289.     Angle :=  -36.8699;
  1290. end;
  1291.  
  1292. with Vec^.FontInfo[ 44] do begin
  1293.      Cdp := round( 10.0895 * units);
  1294.      Cht := 0;
  1295.     Cwd := round( 12.4178 * units);
  1296.     Angle :=  -39.0939;
  1297. end;
  1298.  
  1299. with Vec^.FontInfo[ 45] do begin
  1300.      Cdp := round( 10.5361 * units);
  1301.      Cht := 0;
  1302.     Cwd := round( 12.0412 * units);
  1303.     Angle :=  -41.1859;
  1304. end;
  1305.  
  1306. with Vec^.FontInfo[ 46] do begin
  1307.      Cdp := round( 10.9431 * units);
  1308.      Cht := 0;
  1309.     Cwd := round( 11.6726 * units);
  1310.     Angle :=  -43.1524;
  1311. end;
  1312.  
  1313. with Vec^.FontInfo[ 47] do begin
  1314.      Cdp := round( 11.3137 * units);
  1315.      Cht := 0;
  1316.     Cwd := round( 11.3137 * units);
  1317.     Angle :=  -45.0000;
  1318. end;
  1319.  
  1320. with Vec^.FontInfo[ 48] do begin
  1321.     Cdp := round ( 11.6726 * units);
  1322.     Cht := 0;
  1323.     Cwd := round( 10.9431 * units);
  1324.     Angle :=  -46.8476;
  1325. end;
  1326.  
  1327. with Vec^.FontInfo[ 49] do begin
  1328.     Cdp := round ( 12.0412 * units);
  1329.     Cht := 0;
  1330.     Cwd := round( 10.5361 * units);
  1331.     Angle :=  -48.8141;
  1332. end;
  1333.  
  1334. with Vec^.FontInfo[ 50] do begin
  1335.     Cdp := round ( 12.4178 * units);
  1336.     Cht := 0;
  1337.     Cwd := round( 10.0895 * units);
  1338.     Angle :=  -50.9061;
  1339. end;
  1340.  
  1341. with Vec^.FontInfo[ 51] do begin
  1342.     Cdp := round ( 12.8000 * units);
  1343.     Cht := 0;
  1344.     Cwd := round(  9.6000 * units);
  1345.     Angle :=  -53.1301;
  1346. end;
  1347.  
  1348. with Vec^.FontInfo[ 52] do begin
  1349.     Cdp := round ( 13.1847 * units);
  1350.     Cht := 0;
  1351.     Cwd := round(  9.0645 * units);
  1352.     Angle :=  -55.4915;
  1353. end;
  1354.  
  1355. with Vec^.FontInfo[ 53] do begin
  1356.     Cdp := round ( 13.5680 * units);
  1357.     Cht := 0;
  1358.     Cwd := round(  8.4800 * units);
  1359.     Angle :=  -57.9946;
  1360. end;
  1361.  
  1362. with Vec^.FontInfo[ 54] do begin
  1363.     Cdp := round ( 13.9452 * units);
  1364.     Cht := 0;
  1365.     Cwd := round(  7.8442 * units);
  1366.     Angle :=  -60.6422;
  1367. end;
  1368.  
  1369. with Vec^.FontInfo[ 55] do begin
  1370.     Cdp := round ( 14.3108 * units);
  1371.     Cht := 0;
  1372.     Cwd := round(  7.1554 * units);
  1373.     Angle :=  -63.4349;
  1374. end;
  1375.  
  1376. with Vec^.FontInfo[ 56] do begin
  1377.     Cdp := round ( 14.6585 * units);
  1378.     Cht := 0;
  1379.     Cwd := round(  6.4131 * units);
  1380.     Angle :=  -66.3706;
  1381. end;
  1382.  
  1383. with Vec^.FontInfo[ 57] do begin
  1384.     Cdp := round ( 14.9813 * units);
  1385.     Cht := 0;
  1386.     Cwd := round(  5.6180 * units);
  1387.     Angle :=  -69.4440;
  1388. end;
  1389.  
  1390. with Vec^.FontInfo[ 58] do begin
  1391.     Cdp := round ( 15.2717 * units);
  1392.     Cht := 0;
  1393.     Cwd := round(  4.7724 * units);
  1394.     Angle :=  -72.6460;
  1395. end;
  1396.  
  1397. with Vec^.FontInfo[ 59] do begin
  1398.     Cdp := round ( 15.5223 * units);
  1399.     Cht := 0;
  1400.     Cwd := round(  3.8806 * units);
  1401.     Angle :=  -75.9638;
  1402. end;
  1403.  
  1404. with Vec^.FontInfo[ 60] do begin
  1405.     Cdp := round ( 15.7260 * units);
  1406.     Cht := 0;
  1407.     Cwd := round(  2.9486 * units);
  1408.     Angle :=  -79.3803;
  1409. end;
  1410.  
  1411. with Vec^.FontInfo[ 61] do begin
  1412.     Cdp := round ( 15.8764 * units);
  1413.     Cht := 0;
  1414.     Cwd := round(  1.9846 * units);
  1415.     Angle :=  -82.8750;
  1416. end;
  1417.  
  1418. with Vec^.FontInfo[ 62] do begin
  1419.     Cdp := round ( 15.9688 * units);
  1420.     Cht := 0;
  1421.     Cwd := round(  0.9981 * units);
  1422.     Angle :=  -86.4237;
  1423. end;
  1424.  
  1425. with Vec^.FontInfo[ 63] do begin
  1426.     Cht := round(  8.0000 * units);
  1427.     Cdp := 0;
  1428.     Cwd := 0;
  1429.     Angle :=   90.0000;
  1430. end;
  1431.  
  1432. with Vec^.FontInfo[ 64] do begin
  1433.     Cht := round(  7.9382 * units);
  1434.     Cdp := 0;
  1435.     Cwd := round(  0.9923 * units);
  1436.     Angle :=   82.8750;
  1437. end;
  1438.  
  1439. with Vec^.FontInfo[ 65] do begin
  1440.     Cht := round(  7.7611 * units);
  1441.     Cdp := 0;
  1442.     Cwd := round(  1.9403 * units);
  1443.     Angle :=   75.9638;
  1444. end;
  1445.  
  1446. with Vec^.FontInfo[ 66] do begin
  1447.     Cht := round(  7.4906 * units);
  1448.     Cdp := 0;
  1449.     Cwd := round(  2.8090 * units);
  1450.     Angle :=   69.4440;
  1451. end;
  1452.  
  1453. with Vec^.FontInfo[ 67] do begin
  1454.     Cht := round(  7.1554 * units);
  1455.     Cdp := 0;
  1456.     Cwd := round(  3.5777 * units);
  1457.     Angle :=   63.4349;
  1458. end;
  1459.  
  1460. with Vec^.FontInfo[ 68] do begin
  1461.     Cht := round(  6.7840 * units);
  1462.     Cdp := 0;
  1463.     Cwd := round(  4.2400 * units);
  1464.     Angle :=   57.9946;
  1465. end;
  1466.  
  1467. with Vec^.FontInfo[ 69] do begin
  1468.     Cht := round(  6.4000 * units);
  1469.     Cdp := 0;
  1470.     Cwd := round(  4.8000 * units);
  1471.     Angle :=   53.1301;
  1472. end;
  1473.  
  1474. with Vec^.FontInfo[ 70] do begin
  1475.     Cht := round(  6.0206 * units);
  1476.     Cdp := 0;
  1477.     Cwd := round(  5.2680 * units);
  1478.     Angle :=   48.8141;
  1479. end;
  1480.  
  1481. with Vec^.FontInfo[ 71] do begin
  1482.     Cht := round(  5.6569 * units);
  1483.     Cdp := 0;
  1484.     Cwd := round(  5.6569 * units);
  1485.     Angle :=   45.0000;
  1486. end;
  1487.  
  1488. with Vec^.FontInfo[ 72] do begin
  1489.     Cht := round(  5.2680 * units);
  1490.     Cdp := 0;
  1491.     Cwd := round(  6.0206 * units);
  1492.     Angle :=   41.1859;
  1493. end;
  1494.  
  1495. with Vec^.FontInfo[ 73] do begin
  1496.     Cht := round(  4.8000 * units);
  1497.     Cdp := 0;
  1498.     Cwd := round(  6.4000 * units);
  1499.     Angle :=   36.8699;
  1500. end;
  1501.  
  1502. with Vec^.FontInfo[ 74] do begin
  1503.     Cht := round(  4.2400 * units);
  1504.     Cdp := 0;
  1505.     Cwd := round(  6.7840 * units);
  1506.     Angle :=   32.0054;
  1507. end;
  1508.  
  1509. with Vec^.FontInfo[ 75] do begin
  1510.     Cht := round(  3.5777 * units);
  1511.     Cdp := 0;
  1512.     Cwd := round(  7.1554 * units);
  1513.     Angle :=   26.5651;
  1514. end;
  1515.  
  1516. with Vec^.FontInfo[ 76] do begin
  1517.     Cht := round(  2.8090 * units);
  1518.     Cdp := 0;
  1519.     Cwd := round(  7.4906 * units);
  1520.     Angle :=   20.5560;
  1521. end;
  1522.  
  1523. with Vec^.FontInfo[ 77] do begin
  1524.     Cht := round(  1.9403 * units);
  1525.     Cdp := 0;
  1526.     Cwd := round(  7.7611 * units);
  1527.     Angle :=   14.0362;
  1528. end;
  1529.  
  1530. with Vec^.FontInfo[ 78] do begin
  1531.     Cht := round(  0.9923 * units);
  1532.     Cdp := 0;
  1533.     Cwd := round(  7.9382 * units);
  1534.     Angle :=    7.1250;
  1535. end;
  1536.  
  1537. with Vec^.FontInfo[ 79] do begin
  1538.     Cht := 0;
  1539.     Cdp := 0;
  1540.     Cwd := round(  8.0000 * units);
  1541.     Angle :=    0.0000;
  1542. end;
  1543.  
  1544. with Vec^.FontInfo[ 80] do begin
  1545.      Cdp := round(  0.9923 * units);
  1546.      Cht := 0;
  1547.     Cwd := round(  7.9382 * units);
  1548.     Angle :=   -7.1250;
  1549. end;
  1550.  
  1551. with Vec^.FontInfo[ 81] do begin
  1552.      Cdp := round(  1.9403 * units);
  1553.      Cht := 0;
  1554.     Cwd := round(  7.7611 * units);
  1555.     Angle :=  -14.0362;
  1556. end;
  1557.  
  1558. with Vec^.FontInfo[ 82] do begin
  1559.      Cdp := round(  2.8090 * units);
  1560.      Cht := 0;
  1561.     Cwd := round(  7.4906 * units);
  1562.     Angle :=  -20.5560;
  1563. end;
  1564.  
  1565. with Vec^.FontInfo[ 83] do begin
  1566.      Cdp := round(  3.5777 * units);
  1567.      Cht := 0;
  1568.     Cwd := round(  7.1554 * units);
  1569.     Angle :=  -26.5651;
  1570. end;
  1571.  
  1572. with Vec^.FontInfo[ 84] do begin
  1573.      Cdp := round(  4.2400 * units);
  1574.      Cht := 0;
  1575.     Cwd := round(  6.7840 * units);
  1576.     Angle :=  -32.0054;
  1577. end;
  1578.  
  1579. with Vec^.FontInfo[ 85] do begin
  1580.      Cdp := round(  4.8000 * units);
  1581.      Cht := 0;
  1582.     Cwd := round(  6.4000 * units);
  1583.     Angle :=  -36.8699;
  1584. end;
  1585.  
  1586. with Vec^.FontInfo[ 86] do begin
  1587.      Cdp := round(  5.2680 * units);
  1588.      Cht := 0;
  1589.     Cwd := round(  6.0206 * units);
  1590.     Angle :=  -41.1859;
  1591. end;
  1592.  
  1593. with Vec^.FontInfo[ 87] do begin
  1594.      Cdp := round(  5.6569 * units);
  1595.      Cht := 0;
  1596.     Cwd := round(  5.6569 * units);
  1597.     Angle :=  -45.0000;
  1598. end;
  1599.  
  1600. with Vec^.FontInfo[ 88] do begin
  1601.     Cdp := round (  6.0206 * units);
  1602.     Cht := 0;
  1603.     Cwd := round(  5.2680 * units);
  1604.     Angle :=  -48.8141;
  1605. end;
  1606.  
  1607. with Vec^.FontInfo[ 89] do begin
  1608.     Cdp := round (  6.4000 * units);
  1609.     Cht := 0;
  1610.     Cwd := round(  4.8000 * units);
  1611.     Angle :=  -53.1301;
  1612. end;
  1613.  
  1614. with Vec^.FontInfo[ 90] do begin
  1615.     Cdp := round (  6.7840 * units);
  1616.     Cht := 0;
  1617.     Cwd := round(  4.2400 * units);
  1618.     Angle :=  -57.9946;
  1619. end;
  1620.  
  1621. with Vec^.FontInfo[ 91] do begin
  1622.     Cdp := round (  7.1554 * units);
  1623.     Cht := 0;
  1624.     Cwd := round(  3.5777 * units);
  1625.     Angle :=  -63.4349;
  1626. end;
  1627.  
  1628. with Vec^.FontInfo[ 92] do begin
  1629.     Cdp := round (  7.4906 * units);
  1630.     Cht := 0;
  1631.     Cwd := round(  2.8090 * units);
  1632.     Angle :=  -69.4440;
  1633. end;
  1634.  
  1635. with Vec^.FontInfo[ 93] do begin
  1636.     Cdp := round (  7.7611 * units);
  1637.     Cht := 0;
  1638.     Cwd := round(  1.9403 * units);
  1639.     Angle :=  -75.9638;
  1640. end;
  1641.  
  1642. with Vec^.FontInfo[ 94] do begin
  1643.     Cdp := round (  7.9382 * units);
  1644.     Cht := 0;
  1645.     Cwd := round(  0.9923 * units);
  1646.     Angle :=  -82.8750;
  1647. end;
  1648.  
  1649. with Vec^.FontInfo[ 95] do begin
  1650.     Cdp := round (  8.0000 * units);
  1651.     Cht := 0;
  1652.     Cwd := 0;
  1653.     Angle :=  -90.0000;
  1654. end;
  1655.  
  1656. with Vec^.FontInfo[ 96] do begin
  1657.     Cht := round(  4.0000 * units);
  1658.     Cdp := 0;
  1659.     Cwd := 0;
  1660.     Angle :=   90.0000;
  1661. end;
  1662.  
  1663. with Vec^.FontInfo[ 97] do begin
  1664.     Cht := round(  3.8806 * units);
  1665.     Cdp := 0;
  1666.     Cwd := round(  0.9701 * units);
  1667.     Angle :=   75.9638;
  1668. end;
  1669.  
  1670. with Vec^.FontInfo[ 98] do begin
  1671.     Cht := round(  3.5777 * units);
  1672.     Cdp := 0;
  1673.     Cwd := round(  1.7889 * units);
  1674.     Angle :=   63.4349;
  1675. end;
  1676.  
  1677. with Vec^.FontInfo[ 99] do begin
  1678.     Cht := round(  3.2000 * units);
  1679.     Cdp := 0;
  1680.     Cwd := round(  2.4000 * units);
  1681.     Angle :=   53.1301;
  1682. end;
  1683.  
  1684. with Vec^.FontInfo[100] do begin
  1685.     Cht := round(  2.8284 * units);
  1686.     Cdp := 0;
  1687.     Cwd := round(  2.8284 * units);
  1688.     Angle :=   45.0000;
  1689. end;
  1690.  
  1691. with Vec^.FontInfo[101] do begin
  1692.     Cht := round(  2.4000 * units);
  1693.     Cdp := 0;
  1694.     Cwd := round(  3.2000 * units);
  1695.     Angle :=   36.8699;
  1696. end;
  1697.  
  1698. with Vec^.FontInfo[102] do begin
  1699.     Cht := round(  1.7889 * units);
  1700.     Cdp := 0;
  1701.     Cwd := round(  3.5777 * units);
  1702.     Angle :=   26.5651;
  1703. end;
  1704.  
  1705. with Vec^.FontInfo[103] do begin
  1706.     Cht := round(  0.9701 * units);
  1707.     Cdp := 0;
  1708.     Cwd := round(  3.8806 * units);
  1709.     Angle :=   14.0362;
  1710. end;
  1711.  
  1712. with Vec^.FontInfo[104] do begin
  1713.     Cht := 0;
  1714.     Cdp := 0;
  1715.     Cwd := round(  4.0000 * units);
  1716.     Angle :=    0.0000;
  1717. end;
  1718.  
  1719. with Vec^.FontInfo[105] do begin
  1720.      Cdp := round(  0.9701 * units);
  1721.      Cht := 0;
  1722.     Cwd := round(  3.8806 * units);
  1723.     Angle :=  -14.0362;
  1724. end;
  1725.  
  1726. with Vec^.FontInfo[106] do begin
  1727.      Cdp := round(  1.7889 * units);
  1728.      Cht := 0;
  1729.     Cwd := round(  3.5777 * units);
  1730.     Angle :=  -26.5651;
  1731. end;
  1732.  
  1733. with Vec^.FontInfo[107] do begin
  1734.      Cdp := round(  2.4000 * units);
  1735.      Cht := 0;
  1736.     Cwd := round(  3.2000 * units);
  1737.     Angle :=  -36.8699;
  1738. end;
  1739.  
  1740. with Vec^.FontInfo[108] do begin
  1741.      Cdp := round(  2.8284 * units);
  1742.      Cht := 0;
  1743.     Cwd := round(  2.8284 * units);
  1744.     Angle :=  -45.0000;
  1745. end;
  1746.  
  1747. with Vec^.FontInfo[109] do begin
  1748.     Cdp := round (  3.2000 * units);
  1749.     Cht := 0;
  1750.     Cwd := round(  2.4000 * units);
  1751.     Angle :=  -53.1301;
  1752. end;
  1753.  
  1754. with Vec^.FontInfo[110] do begin
  1755.     Cdp := round (  3.5777 * units);
  1756.     Cht := 0;
  1757.     Cwd := round(  1.7889 * units);
  1758.     Angle :=  -63.4349;
  1759. end;
  1760.  
  1761. with Vec^.FontInfo[111] do begin
  1762.     Cdp := round (  3.8806 * units);
  1763.     Cht := 0;
  1764.     Cwd := round(  0.9701 * units);
  1765.     Angle :=  -75.9638;
  1766. end;
  1767.  
  1768. with Vec^.FontInfo[112] do begin
  1769.     Cdp := round (  4.0000 * units);
  1770.     Cht := 0;
  1771.     Cwd := 0;
  1772.     Angle :=  -90.0000;
  1773. end;
  1774.  
  1775. with Vec^.FontInfo[113] do begin
  1776.     Cht := round(  2.0000 * units);
  1777.     Cdp := 0;
  1778.     Cwd := 0;
  1779.     Angle :=   90.0000;
  1780. end;
  1781.  
  1782. with Vec^.FontInfo[114] do begin
  1783.     Cht := round(  1.7889 * units);
  1784.     Cdp := 0;
  1785.     Cwd := round(  0.8944 * units);
  1786.     Angle :=   63.4349;
  1787. end;
  1788.  
  1789. with Vec^.FontInfo[115] do begin
  1790.     Cht := round(  1.4142 * units);
  1791.     Cdp := 0;
  1792.     Cwd := round(  1.4142 * units);
  1793.     Angle :=   45.0000;
  1794. end;
  1795.  
  1796. with Vec^.FontInfo[116] do begin
  1797.     Cht := round(  0.8944 * units);
  1798.     Cdp := 0;
  1799.     Cwd := round(  1.7889 * units);
  1800.     Angle :=   26.5651;
  1801. end;
  1802.  
  1803. with Vec^.FontInfo[117] do begin
  1804.     Cht := 0;
  1805.     Cdp := 0;
  1806.     Cwd := round(  2.0000 * units);
  1807.     Angle :=    0.0000;
  1808. end;
  1809.  
  1810. with Vec^.FontInfo[118] do begin
  1811.      Cdp := round(  0.8944 * units);
  1812.      Cht := 0;
  1813.     Cwd := round(  1.7889 * units);
  1814.     Angle :=  -26.5651;
  1815. end;
  1816.  
  1817. with Vec^.FontInfo[119] do begin
  1818.      Cdp := round(  1.4142 * units);
  1819.      Cht := 0;
  1820.     Cwd := round(  1.4142 * units);
  1821.     Angle :=  -45.0000;
  1822. end;
  1823.  
  1824. with Vec^.FontInfo[120] do begin
  1825.     Cdp := round (  1.7889 * units);
  1826.     Cht := 0;
  1827.     Cwd := round(  0.8944 * units);
  1828.     Angle :=  -63.4349;
  1829. end;
  1830.  
  1831. with Vec^.FontInfo[121] do begin
  1832.     Cdp := round (  2.0000 * units);
  1833.     Cht := 0;
  1834.     Cwd := 0;
  1835.     Angle :=  -90.0000;
  1836. end;
  1837.  
  1838. with Vec^.FontInfo[122] do begin
  1839.     Cht := round(  1.0000 * units);
  1840.     Cdp := 0;
  1841.     Cwd := 0;
  1842.     Angle :=   90.0000;
  1843. end;
  1844.  
  1845. with Vec^.FontInfo[123] do begin
  1846.     Cht := round(  0.7071 * units);
  1847.     Cdp := 0;
  1848.     Cwd := round(  0.7071 * units);
  1849.     Angle :=   45.0000;
  1850. end;
  1851.  
  1852. with Vec^.FontInfo[124] do begin
  1853.     Cht := 0;
  1854.     Cdp := 0;
  1855.     Cwd := round(  1.0000 * units);
  1856.     Angle :=    0.0000;
  1857. end;
  1858.  
  1859. with Vec^.FontInfo[125] do begin
  1860.      Cdp := round(  0.7071 * units);
  1861.      Cht := 0;
  1862.     Cwd := round(  0.7071 * units);
  1863.     Angle :=  -45.0000;
  1864. end;
  1865.  
  1866. with Vec^.FontInfo[126] do begin
  1867.     Cdp := round (  1.0000 * units);
  1868.     Cht := 0;
  1869.     Cwd := 0;
  1870.     Angle :=  -90.0000;
  1871. end;
  1872.  
  1873. with Vec^.FontInfo[127] do begin
  1874.     Cht := 0;
  1875.     Cdp := 0;
  1876.     Cwd := 0;
  1877.     Angle :=  -90.0000;
  1878. end;
  1879.  
  1880. end; (* define vectors *)
  1881.  
  1882.  
  1883.  
  1884.  
  1885. {-------------------------------------------------}
  1886. (* If, for some reason, you do not want to deal with
  1887.   music capabilities, replace the body of this procedure
  1888.   with just a begin end; pair  and also the TylBeam proc.
  1889. *)    
  1890. procedure definebeams (* var M : pMusFontInfRec *);
  1891. var i : integer;
  1892.   begin
  1893.  
  1894. end;
  1895.  
  1896. {----------------------------------------------------------}
  1897. (* use pre-calculated coordinates of a circle that has a
  1898. E_O_F
  1899. else
  1900.   echo "will not over write ./src/textyl.pas.ac"
  1901. fi
  1902. chmod 644 ./src/textyl.pas.ac
  1903. if [ `wc -c ./src/textyl.pas.ac | awk '{printf $1}'` -ne 21388 ]
  1904. then
  1905. echo `wc -c ./src/textyl.pas.ac | awk '{print "Got " $1 ", Expected " 21388}'`
  1906. fi
  1907. if `test ! -s ./src/textyl.pas.ab`
  1908. then
  1909. echo "writing ./src/textyl.pas.ab"
  1910. cat > ./src/textyl.pas.ab << 'E_O_F'
  1911.  
  1912. {---------------------------------------------------}  
  1913. procedure Output4Byte (i : integer);
  1914. var tmp : integer;
  1915. begin
  1916.   tmp := i;
  1917.   if (tmp >= 0) then
  1918.     begin
  1919.     OutputByte (tmp div TWO24);
  1920.     end
  1921.   else
  1922.     begin
  1923.     tmp := tmp + TWO31 + 1; (* need the +1 *)
  1924.     OutputByte (tmp div TWO24 + 128);
  1925.     end; 
  1926.   tmp := tmp mod TWO24;
  1927.   OutputByte (tmp div TWO16);
  1928.   tmp := tmp mod TWO16;
  1929.   OutputByte (tmp div 256);
  1930.   OutputByte (tmp mod 256);
  1931. end;
  1932.  
  1933.  
  1934. {---------------------------------------------------}
  1935.  
  1936. function rtan (ang : real) : real;
  1937. var rads : real;
  1938.     cosrads : real;
  1939. begin
  1940.   rads := ang * DEGTORAD;
  1941.   cosrads := cos (rads);
  1942.   if (cosrads = 0.0) then  { this happens at 90 and 270 }
  1943.     cosrads := cos ((ang - 0.01) * DEGTORAD);
  1944.   rtan := (sin (rads)) / (cosrads);
  1945. end;
  1946.  
  1947. {---------------------------------------------------}
  1948. function float (i : integer) : real;
  1949. begin
  1950.   float := i + 0.00;
  1951. end;
  1952.  
  1953.  
  1954. {---------------------------------------------------}
  1955. function tolowercase (let: char) : char;
  1956. const Diff = 32; (* xord['a'] - xord['A'] *)
  1957. var olet : integer;
  1958. begin
  1959.  olet := xord[let];
  1960.  if (olet >= xord['A']) then
  1961.     begin
  1962.     if (olet <= xord['Z']) then
  1963.       begin
  1964.       let := xchr[olet + Diff];
  1965.       end;
  1966.     end;
  1967.  tolowercase := let;
  1968. end;
  1969.  
  1970. {---------------------------------------------------}
  1971. (* decide if the first string is the same as the second --
  1972.  * at least the first 'len' characters 
  1973.  *       We need this since most Pascal impls. are brain-dead
  1974.  *       when it comes to string comparisons     
  1975.  *)
  1976. function streq (a, b : charstring; len : integer) : boolean;
  1977. label 1;
  1978. var i : integer;
  1979.     same : boolean;
  1980. begin
  1981.   same := true;
  1982.   for i := 1 to len do
  1983.     begin
  1984.     if (a[i] <> b[i]) then
  1985.       begin
  1986.       same := false;
  1987.       goto 1;
  1988.       end;  (* if *)
  1989.     end;  (* for *)
  1990. 1: 
  1991.    streq := same;  
  1992. end;  (* streq *)
  1993.  
  1994. {-------------------------------------------------------}
  1995. procedure strcopy (* src : charstring; var dest : charstring; len : integer *);
  1996. var i : integer;
  1997.   begin
  1998.   for i := 1 to len do
  1999.     dest[i] := src[i];
  2000.   end;  
  2001.  
  2002. {-------------------------------------------------------}
  2003. procedure writestrng (* s :strng; tologfile : boolean *);
  2004. var i : integer;
  2005. begin
  2006. if (tologfile) then
  2007.   begin
  2008.   for i := 1 to s.len do
  2009.     write (logfile, s.str[i]);
  2010.   end
  2011. else
  2012.   begin
  2013.   for i := 1 to s.len do
  2014.     write (s.str[i]);
  2015.   end;
  2016. end;
  2017.  
  2018.  
  2019. {---------------------------------------------------}
  2020. (* Move the current DVI position to posx, posy by 
  2021.  * moving relatively from our current position
  2022.  * and store the new position 
  2023.  *)
  2024.  
  2025. procedure isetpos (posx, posy : integer);
  2026. var dy, dx: ScaledPts;
  2027.     numbytes : integer;
  2028. begin
  2029.    dx := posx - ourxpos;
  2030.    dy := posy - ourypos;
  2031.  
  2032.    numbytes := 1;
  2033.    if ((dx < 128) and (dx >= -128)) then
  2034.       numbytes := 1
  2035.    else if ((dx < 32768) and (dx >= -32768)) then
  2036.       numbytes := 2
  2037.    else if ((dx < TWO23) and (dx >= - TWO23))then
  2038.       numbytes := 3
  2039.    else if ((dx < TWO31) and (dx >= - TWO31))then
  2040.       numbytes := 4
  2041.    else
  2042.       begin
  2043.       complain (ERRREALBAD);
  2044.       writeln('Panic: dx is too big/small in isetpos: ',dx);
  2045.       writeln(logfile,'Panic: dx is too big/small in isetpos: ',dx);
  2046.       end;
  2047.   
  2048.    cmd1byte (RIGHTLEFT + numbytes -1); (* number of bytes in its arg list *)
  2049.    cmdSigned (dx, numbytes);
  2050.     
  2051.    numbytes := 1;
  2052.    if ((dy < 128) and (dy >= -128)) then
  2053.       numbytes := 1
  2054.    else if ((dy < 32768) and (dy >= -32768)) then
  2055.       numbytes := 2
  2056.    else if ((dy < TWO23) and (dy >= - TWO23))then
  2057.       numbytes := 3
  2058.    else if ((dy < TWO31) and (dy >= - TWO31))then
  2059.       numbytes := 4
  2060.    else
  2061.       begin
  2062.       complain (ERRREALBAD);
  2063.       writeln('Panic: dy is too big/small in isetpos: ',dy);
  2064.       writeln(logfile,'Panic: dy is too big/small in isetpos: ',dy);
  2065.       end;
  2066.   
  2067.    cmd1byte (DOWNUP + numbytes -1);
  2068.   
  2069.    cmdSigned (dy, numbytes);
  2070.   
  2071.    ourxpos := posx;
  2072.    ourypos := posy;
  2073. end;
  2074.  
  2075. {---------------------------------------------------}
  2076. (* put out a character *)
  2077. procedure iputchar (charno : OctByt);
  2078. begin
  2079.   cmd1byte (PUT1);
  2080.   cmd1byte (charno);
  2081. end;
  2082.  
  2083.  
  2084. {---------------------------------------------------}
  2085. (* set the font number, but only if it is different than
  2086.  * the last one we accessed.
  2087.  *)
  2088. procedure isetfont (DVINum : integer);
  2089. begin
  2090.   if (ourfontnum <> DVINum) then
  2091.     begin
  2092.     cmd1byte (USEFONT);
  2093.     cmd2byte (DVINum);
  2094.     ourfontnum := DVINum;
  2095.     end;
  2096. end;
  2097.  
  2098.  
  2099. procedure IPUSH;
  2100. begin
  2101.   if (ourpushdepth = 0) then
  2102.     begin   (* first push --> start tyling *)
  2103.     origTexfont := font[curfont].num;
  2104.     end
  2105.   else
  2106.     begin
  2107.     prevfont := ourfontnum; (* store the internal font number in use at this time *)
  2108.     end;
  2109.   cmd1byte (NOP);
  2110.   cmd1byte (NOP); (* our greeting *)  
  2111.   cmd1byte (PUSH);
  2112.   ourpushdepth := ourpushdepth + 1;
  2113. end;  
  2114.  
  2115. procedure IPOP;
  2116. begin
  2117.   cmd1byte (POP);
  2118.   cmd1byte(NOP);
  2119.   cmd1byte(NOP); (* our signature *)
  2120.   ourpushdepth := ourpushdepth - 1;
  2121.   if (ourpushdepth < 0) then
  2122.     begin
  2123.     complain (ERRREALBAD);
  2124.     writeln(logfile,'Error: too many internal pops');
  2125.     end;
  2126.   if (ourpushdepth = 0) then
  2127.     begin (* we are totally done with tyling for now *)
  2128.     if (nf > 0) then
  2129.       isetfont (origTexfont); (* only if it is valid *)
  2130.     end
  2131.   else
  2132.     begin
  2133.     if (prevfont >= 0) then 
  2134.       isetfont(prevfont);     (* restore that internal font previously in use *)
  2135.     end;
  2136. end;  
  2137.  
  2138. {---------------------------------------------------}
  2139. (* Assumes that the correct font is currently set *)
  2140. procedure Tyldot (dotx, doty : ScaledPts);
  2141. begin
  2142.   if (dotx <> 0) and (doty <> 0) then
  2143.     isetpos (dotx, doty);
  2144.   iputchar (DOTCHAR);
  2145. end;  
  2146.  
  2147. {---------------------------------------------------}
  2148. procedure InitDVIBuf;
  2149. var i: integer;
  2150. begin
  2151.   with GDVIBuf do
  2152.     begin
  2153.     TotByteLen := 0;
  2154.     Numstrings := 0;
  2155.     for i := 1 to MAXDVISTRINGS do
  2156.       Dstrings[i] := nil;
  2157.     curstrindex := MAXOLEN + 1;
  2158.     end; 
  2159. end;
  2160.  
  2161. {---------------------------------------------------}
  2162. procedure ClearDVIBuf;
  2163. var i : integer;
  2164. begin
  2165.   with GDVIBuf do
  2166.     begin
  2167.     for i := 1 to Numstrings do
  2168.       begin
  2169.       dispose (Dstrings[i]);
  2170.       Dstrings[i] := nil;
  2171.       end;
  2172.     TotByteLen := 0;
  2173.     Numstrings := 0;
  2174.     curstrindex := MAXOLEN + 1;
  2175.     end; 
  2176. end;
  2177.  
  2178. {---------------------------------------------------}
  2179. procedure WriteDVIBuf;
  2180. var i: integer;
  2181.     curstr: integer;
  2182.     b : OctByt;
  2183. begin
  2184.   curstr := 1;
  2185.   with GDVIBuf do
  2186.     begin
  2187.     while (curstr < Numstrings) do
  2188.       begin
  2189.       for i := 1 to MAXOLEN do
  2190.         begin
  2191.           b := Dstrings[curstr]^[i];
  2192.           OutputByte (b);       
  2193.         end;
  2194.       curstr := curstr + 1;
  2195.       end; (* while *)
  2196.  
  2197. (* now do the last string *)
  2198.    for i := 1 to (curstrindex - 1) do
  2199.      begin
  2200.        b := Dstrings[Numstrings]^[i];
  2201.        OutputByte(b);
  2202.      end;  (* for *)
  2203.     end;  (* with *)
  2204.   ClearDVIBuf;
  2205. end;
  2206.  
  2207. {---------------------------------------------------}
  2208. procedure BackupInBuf (nbytes : integer);
  2209. var nstrs, rem : integer;
  2210. begin
  2211.   with GDVIBuf do
  2212.     begin
  2213.     nstrs := (TotByteLen - nbytes) div MAXOLEN;
  2214.     rem :=  (TotByteLen - nbytes) mod MAXOLEN;
  2215.     Numstrings :=  nstrs + 1;
  2216.     curstrindex := rem + 1; (* points to position to-be-filled *)
  2217.     if (curstrindex = 0) then 
  2218.        curstrindex := MAXOLEN;
  2219.     TotByteLen := TotByteLen - nbytes;
  2220.     end; 
  2221. end;
  2222.  
  2223. {-----------------------------------------------------}
  2224. function DVIMark : integer;
  2225. begin
  2226.   DVIMark := GDVIBuf.TotByteLen;
  2227. end;  
  2228.  
  2229.  
  2230.  
  2231. {---------------------------------------------}
  2232. function NewItem (what : Primitive): pItem;
  2233. var i : pItem;
  2234.     f : figptr;
  2235. begin
  2236.  
  2237.  new (i);
  2238.  with i^ do 
  2239.    begin
  2240.    nextitem := nil;
  2241.    BBlx := 0;
  2242.    BBby := 0;
  2243.    BBrx := 0;
  2244.    BBty := 0;
  2245.    itemthick := LoVThick;
  2246.    itemvec := VKCirc;
  2247.    itempatt := solid;
  2248.    kind := what;
  2249.    case (what) of          (* give defaults *)
  2250.      Aline : ;
  2251.      Aspline:    begin
  2252.         nsplknots := 0;
  2253.         dosmarks := 0;
  2254.         sclosed := false;
  2255.         spltype := BSPL;
  2256.         end;
  2257.      Attspline:    begin
  2258.         nttknots := 0;
  2259.         dottmarks := 0;
  2260.         tspltype := BSPL;
  2261.         tclosed := false;
  2262.         end;
  2263.      Abeam : ;
  2264.      Atieslur:    begin
  2265.         ntknots := 0;
  2266.         end;
  2267.      Aarc:    begin
  2268.         narcknots := 0;
  2269.         end;         
  2270.      Alabel:    begin
  2271.              fontstyle := -1; (* undefined *)
  2272.         labeltext.len := 0;
  2273.         end;
  2274.      Afigure:    begin    
  2275.         figtheta := 0.0;
  2276.         fsx := 1.0;     fsy := 1.0;
  2277.         fdx := 0;       fdy := 0;
  2278.         preWid := 0;    preHt := 0;
  2279.         postWid := 0;   postHt := 0;
  2280.         depthnumber := 0; (* for now *)
  2281.         new (f); (* a new figure *)
  2282.         body := f;
  2283.         body^.things := nil;
  2284.         end;
  2285.      end; (*case *)
  2286.    end;  (* with *)
  2287.  NewItem := i;
  2288. end;  (* NewItem *)
  2289.  
  2290. { ### Note: "pageitems" could be extended to be a list
  2291. { of macrodefinitions which contain primitives , and
  2292. { then could be instanced.  E.g., a library of common
  2293. { figures callable from \special level }
  2294.  
  2295.  
  2296. {------------------------------------------------------}
  2297. procedure pushItem (depth : integer; newthing : pItem);
  2298. label 101;
  2299. var i, p : pItem;
  2300.     dun : boolean;
  2301. begin
  2302.   if (pageitems = nil) then
  2303.     begin
  2304.     if (newthing^.kind = Afigure) then
  2305.       begin
  2306.       pageitems := newthing;
  2307.       goto 101;
  2308.       end
  2309.     else
  2310.       begin
  2311.       pageitems := NewItem (Afigure);
  2312.       pageitems^.depthnumber := depth;
  2313.       end;
  2314.     end;
  2315.   
  2316.   (* Assume that pageitems points to Afigure *)
  2317.  
  2318.       (* traverse the list *)
  2319.       i := pageitems; (* point to front of list for now *)
  2320.       p := i^.body^.things; 
  2321.       dun := false;
  2322.       while ((p <> nil) and not dun) do
  2323.         begin
  2324.         if (depth = i^.depthnumber) then
  2325.           begin (* simple push *)
  2326.           dun := true;
  2327.           (* Note: this is the case when pushing another figure item
  2328.                 onto an already-existing list. We push the newfigure
  2329.                 with a depth of (fig^.depthnumber - 1) because it
  2330.                 really is part of the higer-level figure
  2331.            *)
  2332.           end
  2333.         else if (depth > i^.depthnumber) then   
  2334.           begin
  2335.           (* there MUST be a figure with a higher number deeper *)
  2336.           while ((p^.kind <> Afigure) and (p^.nextitem <> nil)) do
  2337.             begin
  2338.             p := p^.nextitem;
  2339.             end;
  2340.  
  2341.           if (p^.kind = Afigure) then
  2342.             begin
  2343.             i := p;
  2344.             p := i^.body^.things;
  2345.             end
  2346.           else
  2347.         begin
  2348.         complain (ERRREALBAD);
  2349.             writeln(logfile,'OOPS p^.kind isnt a figure. It must be near endoflist');
  2350.         end;
  2351.           end;
  2352.         end;  (* while *)
  2353.  
  2354.       (* we have the correct front of list-list,
  2355.          and i points to Afigure item *)
  2356.       newthing^.nextitem := p;
  2357.       i^.body^.things := newthing;
  2358. 101:
  2359. end;  (*  pushItem *)
  2360.  
  2361.  
  2362.  
  2363. {---------------------------------------------}
  2364. function Tgetfixword (k: integer) : real;
  2365. var a : 0 .. 4096;
  2366.     f : integer;
  2367. begin
  2368.   a := (tfm[k] * 16) + (tfm[k + 1] div 16);
  2369.   f := ((((tfm[k + 1] mod 16) * 256)
  2370.          + tfm[k + 2]) * 256)
  2371.          + tfm[k + 3];
  2372.   if (a > 2047) then
  2373.     begin
  2374.     a := 4096 - a;
  2375.     if (f > 0) then
  2376.       begin
  2377.       f := TWO20 - f;
  2378.       a := a - 1;
  2379.       end;
  2380.     end;
  2381.   Tgetfixword := a + f / TWO20;
  2382. end;
  2383.  
  2384. {-----------------------------------------------------}
  2385. function TgetSigned (k: integer): integer;
  2386. var i: integer;
  2387. begin 
  2388.   i := tfm[k];
  2389.   if (i < 128) then
  2390.     i := i - 256;
  2391.   TgetSigned := (((((i * 256) + tfm[k + 1]) * 256) +
  2392.                         tfm[k + 2]) * 256) + tfm[k + 3];
  2393. end;
  2394.  
  2395.  
  2396.  
  2397. {-----------------------------------------------------------}
  2398. (* open a .tfm file and return the parameters in it.  
  2399.  * Used only in conjuction with the vector and music fonts 
  2400.  *)
  2401. procedure gettfm (tfmfilnam: strng; 
  2402.                   var dessize, p1, p2, p3, p4, p5, p6, p7 : ScaledPts;
  2403.                   var cksum : integer);
  2404. label 9999;
  2405. var tfmptr: integer;
  2406.     lf, lh, bc, ec, nw, nh, nd, ni, nl, nk, ne, np: integer;
  2407.     charbase, widthbase, heightbase, depthbase,
  2408.     italicbase, ligkernbase, kernbase, extenbase,
  2409.     parambase : integer;
  2410.     tempdesignsize : ScaledPts;
  2411. begin
  2412.   p1 := 0; p2 := 0; p3 := 0; p4 := 0;
  2413.   p5 := 0; p6 := 0; p7 := 0;
  2414.   cksum := -1;
  2415.  
  2416.   strcopy(tfmfilnam.str,  tfmname.str, tfmfilnam.len);
  2417.   tfmname.len := tfmfilnam.len;
  2418.  
  2419.   tfmname.str[tfmname.len + 1] := chr(32);
  2420.  
  2421.   if (not opentfmfile) then
  2422.     begin
  2423.       complain (ERRREALBAD);
  2424.       writestrng(tfmname,true);
  2425.       writeln(logfile,'---not loaded, TFM file can''t be opened!');
  2426.       writestrng(tfmname,false);
  2427.       writeln(' cannot be opened. Aborting');
  2428.       jumpout;
  2429.     end;
  2430.  
  2431.  
  2432.   tfm[0] := Tgetvaxbyte;
  2433.   tfm[1] := Tgetvaxbyte;
  2434.  
  2435.  
  2436.   lf := (tfm[0] * 256) + tfm[1];
  2437.   if ((4 * lf - 1) > TFMSIZE) then 
  2438.     begin
  2439.     complain (ERRREALBAD);
  2440.     write(logfile,'The tfm file:');
  2441.     writestrng(tfmfilnam, true);
  2442.     writeln(logfile,' is bigger than I can handle!');
  2443.     goto 9999;
  2444.     end;
  2445.  
  2446.   for tfmptr := 2 to (4 * lf) - 1 do 
  2447.     begin
  2448.  
  2449.     tfm[tfmptr] := Tgetvaxbyte;
  2450.  
  2451.     end; (* for *)
  2452.  
  2453.   tfmptr := 2;
  2454.   lh := (tfm[tfmptr] * 256) + tfm[tfmptr + 1];
  2455.   tfmptr := tfmptr + 2;
  2456.  
  2457.   bc := (tfm[tfmptr] * 256) + tfm[tfmptr + 1];
  2458.   tfmptr := tfmptr + 2;
  2459.  
  2460.   ec := (tfm[tfmptr] * 256) + tfm[tfmptr + 1];
  2461.   tfmptr := tfmptr + 2;
  2462.  
  2463.   nw := (tfm[tfmptr] * 256) + tfm[tfmptr + 1];
  2464.   tfmptr := tfmptr + 2;
  2465.  
  2466.   nh := (tfm[tfmptr] * 256) + tfm[tfmptr + 1];
  2467.   tfmptr := tfmptr + 2;
  2468.  
  2469.   nd := (tfm[tfmptr] * 256) + tfm[tfmptr + 1];
  2470.   tfmptr := tfmptr + 2;
  2471.  
  2472.   ni := (tfm[tfmptr] * 256) + tfm[tfmptr + 1];
  2473.   tfmptr := tfmptr + 2;
  2474.  
  2475.   nl := (tfm[tfmptr] * 256) + tfm[tfmptr + 1];
  2476.   tfmptr := tfmptr + 2;
  2477.  
  2478.   nk := (tfm[tfmptr] * 256) + tfm[tfmptr + 1];
  2479.   tfmptr := tfmptr + 2;
  2480.  
  2481.   ne := (tfm[tfmptr] * 256) + tfm[tfmptr + 1];
  2482.   tfmptr := tfmptr + 2;
  2483.  
  2484.   np := (tfm[tfmptr] * 256) + tfm[tfmptr + 1];
  2485.   tfmptr := tfmptr + 2;
  2486.  
  2487.   if (lf <> (6 + lh + ((ec - bc) + 1) + nw + nh
  2488.                           + nd + ni + nl + nk + ne + np)) then 
  2489.     begin
  2490.       complain (ERRREALBAD);
  2491.       writestrng(tfmfilnam, true);
  2492.       writeln(logfile,': subfile sizes don''t add up to the stated total!');
  2493.       writeln(logfile,'Sorry, but I can''t go on; are you sure this is a TFM?');
  2494.       goto 9999
  2495.     end;
  2496.   if (bc > (ec + 1)) or (ec > 255) then 
  2497.     begin
  2498.       complain (ERRREALBAD);
  2499.       writeln(logfile,'The character code range ', bc: 1, '..', ec: 1, 'is illegal!');
  2500.       writeln(logfile,'Sorry, but I can''t go on; are you sure this is a TFM?');
  2501.       goto 9999;
  2502.     end;
  2503.   charbase := (6 + lh) - bc;
  2504.   widthbase := (charbase + ec) + 1;
  2505.   heightbase := widthbase + nw;
  2506.   depthbase := heightbase + nh;
  2507.   italicbase := depthbase + nd;
  2508.   ligkernbase := italicbase + ni;
  2509.   kernbase := ligkernbase + nl;
  2510.   extenbase := kernbase + nk;
  2511.   parambase := (extenbase + ne) - 1;
  2512.  
  2513.   dessize := round (Tgetfixword (28) * SPPERPT); (* now in ScaledPts *)
  2514.   tempdesignsize := round (dessize * magfactor);
  2515.   cksum := TgetSigned (24);
  2516.           (* return the special 7 parameters for the  font *)
  2517.   p1 := round (Tgetfixword (4 * (parambase + 1)) * tempdesignsize);
  2518.   p2 := round (Tgetfixword (4 * (parambase + 2)) * tempdesignsize);
  2519.   p3 := round (Tgetfixword (4 * (parambase + 3)) * tempdesignsize);
  2520.   p4 := round (Tgetfixword (4 * (parambase + 4)) * tempdesignsize);
  2521.   p5 := round (Tgetfixword (4 * (parambase + 5)) * tempdesignsize);
  2522.   p6 := round (Tgetfixword (4 * (parambase + 6)) * tempdesignsize);
  2523.   p7 := round (Tgetfixword (4 * (parambase + 7)) * tempdesignsize);
  2524.  
  2525. 9999:
  2526. end;
  2527.  
  2528.  
  2529. {---------------------------------------------------}
  2530. procedure initVnMnLtables;
  2531. var i: integer;
  2532. begin
  2533.   for i := 1 to SizVFontTable do
  2534.     VFontTable[i] := nil;
  2535.   for i := 1 to SizMFontTable do
  2536.     MFontTable[i] := nil;
  2537.   for i := 1 to SizLFontTable do
  2538.     LFontTable[i] := nil;
  2539.   VFontsDefd := 0;
  2540.   MFontsDefd := 0;
  2541.   LFontsDefd := 0;
  2542.   GDVIFN := 300; (* starting number for any new fonts that we define *)
  2543. end; 
  2544.  
  2545.  
  2546. {-------------------------------------------------------}
  2547. procedure fonttobedefined (kind : char; findex : integer);
  2548. begin
  2549.   FTBDs := FTBDs + 1;  
  2550. (* reset this to zero after outputting
  2551.    1. fontdefs
  2552.    2. bop
  2553.    3. contents of dvi page
  2554.    4. eop
  2555. *)
  2556.   TBD[FTBDs].which := kind;
  2557.   TBD[FTBDs].indx := findex;
  2558. end;
  2559.  
  2560.  
  2561. {-----------------------------------------------------}
  2562. procedure enterfont (fontnum : integer; ck : integer;
  2563.                      scalefact, dessiz : ScaledPts;
  2564.                      nam : strng);
  2565. var n: integer;
  2566.     len : integer;
  2567. begin
  2568.   cmd1byte(FONTDEF);
  2569.   cmd2byte(fontnum);
  2570.   cmd4byte(ck);
  2571.   cmd4byte(scalefact);
  2572.   cmd4byte(dessiz);
  2573.   cmd1byte(USESTDAREA);
  2574.  
  2575.   len := nam.len;
  2576.  
  2577.  
  2578.   cmd1byte(len - 4); (* skip the length of the .tfm suffix *)
  2579.  
  2580.  
  2581.   for n := 1 to (nam.len - 4) do    
  2582.  
  2583.     begin (* skip the .tfm suffix *)
  2584.     cmd1byte (xord [ nam.str[n] ]);
  2585.     end;
  2586. end;
  2587.  
  2588.  
  2589. {-----------------------------------------------------}
  2590. procedure Outputfont (fontnum : integer; ck : integer;
  2591.                      scalefact, dessiz : ScaledPts;
  2592.                      nam : strng);
  2593. var n: integer;
  2594.     len : integer;
  2595. begin
  2596.   OutputByte(FONTDEF);
  2597.   Output2Byte(fontnum);
  2598.   Output4Byte(ck);
  2599.   Output4Byte(scalefact);
  2600.   Output4Byte(dessiz);
  2601.   OutputByte(USESTDAREA);
  2602.  
  2603.   len := nam.len;
  2604.  
  2605.  
  2606.   OutputByte(len - 4);
  2607.  
  2608.  
  2609.   for n := 1 to (nam.len - 4) do    
  2610.  
  2611.     begin (* dont output the default dir prefix, nor the .tfm suffix *)
  2612.     OutputByte(xord [ nam.str[n] ]);
  2613.     end;
  2614. end;
  2615.  
  2616. {-----------------------------------------------------}
  2617. procedure defineNewfonts;
  2618. (* this needs to be done before first access to a font on a page
  2619.   later someone else will have to re-define all of them in the postamble *)
  2620. label 99;
  2621. var i, n : integer;
  2622.     f : integer;
  2623. begin
  2624.   for i := 1 to FTBDs do
  2625.     begin
  2626.     if (TBD[i].which = 'V') then
  2627.       begin
  2628.       f := TBD[i].indx;
  2629.       with VFontTable[f]^ do  
  2630.         begin
  2631.         if (Isdefined) then
  2632.          goto 99;
  2633.         Outputfont (DVIFontNum, Cksum, DesSize, DesSize, 
  2634.                         FontName);
  2635.         Isdefined := true;
  2636.         end; (*with *)
  2637.       end (* if *)
  2638.     else if (TBD[i].which = 'M') then
  2639.       begin (* music font *)
  2640.       f := TBD[i].indx;
  2641.       with MFontTable[f]^ do
  2642.         begin
  2643.         if (Isdefined) then
  2644.          goto 99;
  2645.         Outputfont (DVIFontNum, Cksum, DesSize, DesSize,
  2646.                         FontName);
  2647.         Isdefined := true;
  2648.         end; (* with *)
  2649.       end (* else *)
  2650.     else if (TBD[i].which = 'L') then
  2651.       begin (* label font *)
  2652.       f := TBD[i].indx;
  2653.       with LFontTable[f]^ do
  2654.     begin
  2655.     if (Isdefined) then
  2656.       goto 99;
  2657.     Outputfont (DVIFontNum, Cksum, DesSize, DesSize, {### is this right?}
  2658.             FontName);
  2659.     Isdefined := true;
  2660.     end;  (* with *)
  2661.       end 
  2662.     else
  2663.       begin
  2664.       complain (ERRREALBAD);
  2665.       writeln(logfile,'Unknown type of font to be defined:"',TBD[i].which,'"');
  2666.       end;  (* else *)
  2667. 99:
  2668.     end; (* for *)
  2669. end; 
  2670.  
  2671.  
  2672. {---------------------------------------------------}
  2673. function GetMusFont (stfsiz, fam : integer) : MusIndex;
  2674. label 20, 99;
  2675. var mustfmnam : strng;
  2676.     found, i : MusIndex;
  2677.     design, p1, p2, p3, p4, linesp, gwidth, p7 : ScaledPts;
  2678.     cksm, r, k : integer;
  2679. begin
  2680.   (* see if it already exists *)
  2681.   found := 0;
  2682.   for i := 1 to MFontsDefd do  (* loop through since there are few *)
  2683.     with MFontTable[i]^ do
  2684.       begin
  2685.       if (Staffsize = stfsiz) and
  2686.          (Family = fam) then
  2687.          begin
  2688.          found := i;
  2689.          goto 20;
  2690.          end;
  2691.       end; (* with *)
  2692.   
  2693. 20: if (found <> 0) then
  2694.      begin
  2695.      GetMusFont := found;
  2696.      goto 99;
  2697.      end;
  2698.     
  2699.     (* Not here already--go get it *)
  2700.     for k := 1 to ARRLIMIT do
  2701.       mustfmnam.str[k] := ' ';
  2702.  
  2703.     r := 0;
  2704.  
  2705.     mustfmnam.str[r+1] := 'm';
  2706.     mustfmnam.str[r+2] := 'u';
  2707.     mustfmnam.str[r+3] := 's';
  2708.     mustfmnam.str[r+4] := xchr[stfsiz + xord['0']];
  2709.     mustfmnam.str[r+5] := xchr[fam + xord['0']];
  2710.     mustfmnam.str[r+6] := '.';
  2711.     mustfmnam.str[r+7] := 't';
  2712.     mustfmnam.str[r+8] := 'f';
  2713.     mustfmnam.str[r+9] := 'm';    
  2714.  
  2715.     mustfmnam.str[r+10] := chr(32);
  2716.  
  2717.     mustfmnam.len := 9 + r;
  2718.     gettfm (mustfmnam, design, p1, p2, p3, p4, linesp, gwidth, p7, cksm);
  2719.  
  2720.     MFontsDefd := MFontsDefd + 1;
  2721.    if (MFontsDefd > SizMFontTable) then
  2722.      begin
  2723.        complain (ERRREALBAD);
  2724.        writestrng(mustfmnam, true);
  2725.        writeln(logfile,'---not loadable. Size of Music Font table too small');
  2726.        writestrng(mustfmnam,false);
  2727.        writeln(' cannot be loaded. Too many music fonts. Table too small.');
  2728.        jumpout;
  2729.      end;
  2730.  
  2731.     i := MFontsDefd;
  2732.     new (MFontTable[i]);
  2733.     with MFontTable[i]^ do
  2734.       begin
  2735.       Staffsize := stfsiz;    
  2736.       Family := fam;
  2737.       DesSize := design;
  2738.       strcopy (mustfmnam.str, FontName.str, mustfmnam.len);
  2739.       FontName.len := mustfmnam.len;
  2740.       Cksum := cksm;
  2741.       ghu := round (gwidth / QNOTEGHUS);
  2742.       gvu := round (linesp / QNOTEGVUS);
  2743.       DVIFontNum := GDVIFN + 1;
  2744.       Isdefined := false;
  2745.       end;
  2746.  
  2747.     GDVIFN := GDVIFN + 1;
  2748. (* call someone to do the defns of cdp, cht, cwd foreach beam *)      
  2749.     definebeams (MFontTable[i]);
  2750.     fonttobedefined ('M', i);
  2751.     GetMusFont := i;
  2752. 99:    
  2753. end; 
  2754.  
  2755.  
  2756. {---------------------------------------------------}
  2757. function GetVectFont (size : VThickness; vk : VectKind) : VecIndex;
  2758. label 20, 99;
  2759. var vectfmnam : strng;
  2760.     found, i : VecIndex;
  2761.     design, p1, p2, w0, w1, maxveclen, p6, p7 : ScaledPts;
  2762.     cksm, r, k : integer;
  2763. begin
  2764.   (* see if it already exists *)
  2765.   found := 0;
  2766.  
  2767.   for i := 1 to VFontsDefd do
  2768.    with VFontTable[i]^ do
  2769.     begin
  2770.     if ((psize = size) and
  2771.         (vkind = vk)) then
  2772.        begin
  2773.        found := i;
  2774.        goto 20;
  2775.        end;
  2776.     end; (* with *)
  2777.     
  2778. 20:
  2779.   if (found <> 0) then
  2780.    begin
  2781.      GetVectFont := found;
  2782.      goto 99;
  2783.    end;
  2784.     
  2785.     (* Not here--go get it *)
  2786.     for k := 1 to ARRLIMIT do
  2787.       vectfmnam.str[k] := ' ';
  2788.  
  2789.     r := 0;
  2790.  
  2791.     case (vk) of
  2792.       VKCirc : vectfmnam.str[r+1] := 'c';
  2793.       VKVert : vectfmnam.str[r+1] := 'v';
  2794.       VKHort : vectfmnam.str[r+1] := 'h';
  2795.     end; (*case *)
  2796.     vectfmnam.str[r+2] := 'v';
  2797.     vectfmnam.str[r+3] := 'e';
  2798.     vectfmnam.str[r+4] := 'c';
  2799.      if (size <= 9) then
  2800.       begin
  2801.       vectfmnam.str[r+5] := xchr[size + xord['0']];
  2802.       vectfmnam.str[r+6] := '.';
  2803.       vectfmnam.str[r+7] := 't';
  2804.       vectfmnam.str[r+8] := 'f';
  2805.       vectfmnam.str[r+9] := 'm';
  2806.  
  2807.       vectfmnam.str[r+10] := chr(32);      
  2808.  
  2809.       vectfmnam.len := 9 + r;
  2810.       end
  2811.     else
  2812.       begin
  2813.       vectfmnam.str[r+5] := xchr[(size div 10) + xord['0']];
  2814.       vectfmnam.str[r+6] := xchr[(size - ((size div 10)*10)) + xord['0']];
  2815.       vectfmnam.str[r+7] := '.';
  2816.       vectfmnam.str[r+8] := 't';
  2817.       vectfmnam.str[r+9] := 'f';
  2818.       vectfmnam.str[r+10] := 'm';
  2819.  
  2820.       vectfmnam.str[r+11] := chr(32);      
  2821.  
  2822.       vectfmnam.len := 10 + r;
  2823.       end;
  2824.  
  2825.    gettfm (vectfmnam, design, p1, p2, w0, w1, maxveclen, p6, p7, cksm);
  2826.    VFontsDefd := VFontsDefd + 1;
  2827.    if (VFontsDefd > SizVFontTable) then
  2828.      begin
  2829.        complain (ERRREALBAD);
  2830.        writestrng(vectfmnam, true);
  2831.        writeln(logfile,'---not loadable. Size of Vector Font table too small');
  2832.        writestrng(vectfmnam,false);
  2833.        writeln(' cannot be loaded. Too many vector fonts. Table too small.');
  2834.        jumpout;
  2835.      end;
  2836.  
  2837.    i := VFontsDefd;
  2838.    new (VFontTable[i]);
  2839.    with VFontTable[i]^ do
  2840.      begin
  2841.      vkind := vk;
  2842.      psize := size;
  2843.      DesSize := design;
  2844.      if (vk = VKVert) then
  2845.        PenSize := w1    
  2846.      else
  2847.        PenSize := w0;
  2848.      PenSize := round (size * (MAXVECLENsp / 16.0));
  2849.      MaxVectLen := maxveclen;
  2850.      strcopy (vectfmnam.str, FontName.str, vectfmnam.len);
  2851.      FontName.len := vectfmnam.len;
  2852.      Cksum := cksm;
  2853.      Isdefined := false;
  2854.      DVIFontNum := GDVIFN + 1;
  2855.      end;
  2856.  
  2857.   GDVIFN := GDVIFN + 1;
  2858.  
  2859.   definevectors (VFontTable[i]);
  2860. (* someone asked for it, so they must want it, and we should fntdef it *)
  2861.   fonttobedefined ('V', i); 
  2862.   GetVectFont := i;
  2863. 99:
  2864. end;
  2865.  
  2866. {----------------------------------------------------------}
  2867. function GetLabFont (style : integer) : integer;
  2868. label 30, 99;
  2869. var labtfmnam : strng;
  2870.     found, i : integer;
  2871.     design, p1, space, p3, p4, p5, p6, p7 : ScaledPts;
  2872.     cksm, r, k : integer;
  2873. begin
  2874. if (style > MAXLABELFONTS) then
  2875.   style := 1;
  2876.   found := 0;
  2877.   for i := 1 to LFontsDefd do
  2878.     with LFontTable[i]^ do
  2879.       begin
  2880.       if (internalnumber = style) then
  2881.     begin
  2882.         found := i;
  2883.     goto 30;
  2884.     end;
  2885.       end; 
  2886. 30:
  2887.    if (found <> 0) then
  2888.      begin
  2889.      GetLabFont := found;
  2890.      goto 99;
  2891.      end;  
  2892.    for k := 1 to ARRLIMIT do
  2893.      labtfmnam.str[k] := ' ';
  2894.  
  2895.    r := 0;
  2896.  
  2897.    labtfmnam.str[r + 1] := 'c';
  2898.    labtfmnam.str[r + 2] := 'm';
  2899.    case style of
  2900.      1: begin        (* cmtt10 *)
  2901.         labtfmnam.str[r + 3] := 't';
  2902.         labtfmnam.str[r + 4] := 't';
  2903.         labtfmnam.str[r + 5] := '1';
  2904.         labtfmnam.str[r + 6] := '0';
  2905.     k := r + 6;
  2906.         end;
  2907.      2: begin        (* cmb10 *)
  2908.         labtfmnam.str[r + 3] := 'b';
  2909.         labtfmnam.str[r + 4] := '1';
  2910.         labtfmnam.str[r + 5] := '0';
  2911. E_O_F
  2912. else
  2913.   echo "will not over write ./src/textyl.pas.ab"
  2914. fi
  2915. chmod 644 ./src/textyl.pas.ab
  2916. if [ `wc -c ./src/textyl.pas.ab | awk '{printf $1}'` -ne 24667 ]
  2917. then
  2918. echo `wc -c ./src/textyl.pas.ab | awk '{print "Got " $1 ", Expected " 24667}'`
  2919. fi
  2920. echo "Finished archive 7 of 9"
  2921. exit
  2922.